diff --git a/ts/components/conversation/Message.tsx b/ts/components/conversation/Message.tsx index 151e1971ff..e253e8c919 100644 --- a/ts/components/conversation/Message.tsx +++ b/ts/components/conversation/Message.tsx @@ -185,7 +185,10 @@ export type PropsActions = { displayTapToViewMessage: (messageId: string) => unknown; openLink: (url: string) => void; - scrollToQuotedMessage: (options: { author: string; sentAt: number }) => void; + scrollToQuotedMessage: (options: { + authorId: string; + sentAt: number; + }) => void; selectMessage?: (messageId: string, conversationId: string) => unknown; showExpiredIncomingTapToViewToast: () => unknown; @@ -971,7 +974,7 @@ export class Message extends React.PureComponent { ? undefined : () => { scrollToQuotedMessage({ - author: quote.authorId, + authorId: quote.authorId, sentAt: quote.sentAt, }); }; diff --git a/ts/models/messages.ts b/ts/models/messages.ts index fbb13027cd..4e3d4f1ebd 100644 --- a/ts/models/messages.ts +++ b/ts/models/messages.ts @@ -1133,7 +1133,7 @@ export class MessageModel extends window.Backbone.Model { bodyRanges: this.processBodyRanges(bodyRanges), isFromMe, sentAt, - authorId: author, + authorId: contact ? contact.id : undefined, authorPhoneNumber, authorProfileName, authorTitle, diff --git a/ts/util/lint/exceptions.json b/ts/util/lint/exceptions.json index 6244744a46..ae73c5926a 100644 --- a/ts/util/lint/exceptions.json +++ b/ts/util/lint/exceptions.json @@ -14817,7 +14817,7 @@ "rule": "React-createRef", "path": "ts/components/conversation/Message.tsx", "line": " public audioRef: React.RefObject = React.createRef();", - "lineNumber": 223, + "lineNumber": 226, "reasonCategory": "usageTrusted", "updated": "2020-09-08T20:19:01.913Z" }, @@ -14825,7 +14825,7 @@ "rule": "React-createRef", "path": "ts/components/conversation/Message.tsx", "line": " public focusRef: React.RefObject = React.createRef();", - "lineNumber": 225, + "lineNumber": 228, "reasonCategory": "usageTrusted", "updated": "2020-09-08T20:19:01.913Z" }, @@ -14833,7 +14833,7 @@ "rule": "React-createRef", "path": "ts/components/conversation/Message.tsx", "line": " > = React.createRef();", - "lineNumber": 229, + "lineNumber": 232, "reasonCategory": "usageTrusted", "updated": "2020-08-28T19:36:40.817Z" }, diff --git a/ts/views/conversation_view.ts b/ts/views/conversation_view.ts index b2a7203115..f5cebd358b 100644 --- a/ts/views/conversation_view.ts +++ b/ts/views/conversation_view.ts @@ -797,7 +797,7 @@ Whisper.ConversationView = Whisper.View.extend({ }; const scrollToQuotedMessage = async (options: any) => { - const { author, sentAt } = options; + const { authorId, sentAt } = options; const conversationId = this.model.id; const messages = await getMessagesBySentAt(sentAt, { @@ -806,7 +806,8 @@ Whisper.ConversationView = Whisper.View.extend({ const message = messages.find( item => item.get('conversationId') === conversationId && - item.getSource() === author + authorId && + item.getContactId() === authorId ); if (!message) {