Message Detail: Ensure that quotes are not clickable
This commit is contained in:
parent
601ad3773c
commit
768007a269
2 changed files with 16 additions and 13 deletions
|
@ -452,7 +452,7 @@
|
|||
snippet: this.get('snippet'),
|
||||
};
|
||||
},
|
||||
getPropsForMessage() {
|
||||
getPropsForMessage(options) {
|
||||
const phoneNumber = this.getSource();
|
||||
const contact = this.findAndFormatContact(phoneNumber);
|
||||
const contactModel = this.findContact(phoneNumber);
|
||||
|
@ -491,7 +491,7 @@
|
|||
.filter(attachment => !attachment.error)
|
||||
.map(attachment => this.getPropsForAttachment(attachment)),
|
||||
previews: this.getPropsForPreview(),
|
||||
quote: this.getPropsForQuote(),
|
||||
quote: this.getPropsForQuote(options),
|
||||
authorAvatarPath,
|
||||
isExpired: this.hasExpired,
|
||||
expirationLength,
|
||||
|
@ -601,7 +601,8 @@
|
|||
image: preview.image ? this.getPropsForAttachment(preview.image) : null,
|
||||
}));
|
||||
},
|
||||
getPropsForQuote() {
|
||||
getPropsForQuote(options = {}) {
|
||||
const { noClick } = options;
|
||||
const quote = this.get('quote');
|
||||
if (!quote) {
|
||||
return null;
|
||||
|
@ -620,13 +621,15 @@
|
|||
const authorProfileName = contact ? contact.getProfileName() : null;
|
||||
const authorName = contact ? contact.getName() : null;
|
||||
const isFromMe = contact ? contact.id === this.OUR_NUMBER : false;
|
||||
const onClick = () => {
|
||||
this.trigger('scroll-to-message', {
|
||||
author,
|
||||
id,
|
||||
referencedMessageNotFound,
|
||||
});
|
||||
};
|
||||
const onClick = noClick
|
||||
? null
|
||||
: () => {
|
||||
this.trigger('scroll-to-message', {
|
||||
author,
|
||||
id,
|
||||
referencedMessageNotFound,
|
||||
});
|
||||
};
|
||||
|
||||
const firstAttachment = quote.attachments && quote.attachments[0];
|
||||
|
||||
|
@ -753,7 +756,7 @@
|
|||
sentAt: this.get('sent_at'),
|
||||
receivedAt: this.get('received_at'),
|
||||
message: {
|
||||
...this.getPropsForMessage(),
|
||||
...this.getPropsForMessage({ noClick: true }),
|
||||
disableMenu: true,
|
||||
// To ensure that group avatar doesn't show up
|
||||
conversationType: 'direct',
|
||||
|
|
|
@ -207,7 +207,7 @@
|
|||
"rule": "jQuery-wrap(",
|
||||
"path": "js/models/messages.js",
|
||||
"line": " return this.send(wrap(promise));",
|
||||
"lineNumber": 935,
|
||||
"lineNumber": 938,
|
||||
"reasonCategory": "falseMatch",
|
||||
"updated": "2018-10-05T23:12:28.961Z"
|
||||
},
|
||||
|
@ -215,7 +215,7 @@
|
|||
"rule": "jQuery-wrap(",
|
||||
"path": "js/models/messages.js",
|
||||
"line": " return wrap(",
|
||||
"lineNumber": 1182,
|
||||
"lineNumber": 1185,
|
||||
"reasonCategory": "falseMatch",
|
||||
"updated": "2018-10-05T23:12:28.961Z"
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue