From d39ede068a4eec153c5400da1c6952df7778c409 Mon Sep 17 00:00:00 2001
From: Scott Nonnenberg <scott@signal.org>
Date: Fri, 25 Sep 2020 09:59:45 -0700
Subject: [PATCH] Two small bugfixes

---
 ts/components/conversation/MessageBody.tsx |  3 ++-
 ts/models/conversations.ts                 | 12 +++++++-----
 2 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/ts/components/conversation/MessageBody.tsx b/ts/components/conversation/MessageBody.tsx
index 780037c05c..65f6d0d331 100644
--- a/ts/components/conversation/MessageBody.tsx
+++ b/ts/components/conversation/MessageBody.tsx
@@ -66,8 +66,9 @@ export class MessageBody extends React.Component<Props> {
       <AddNewLines
         key={key}
         text={textWithNewLines}
-        renderNonNewLine={({ text }) => (
+        renderNonNewLine={({ text, key: innerKey }) => (
           <AtMentionify
+            key={innerKey}
             direction={direction}
             text={text}
             bodyRanges={bodyRanges}
diff --git a/ts/models/conversations.ts b/ts/models/conversations.ts
index ed63058f4e..a5e076e28c 100644
--- a/ts/models/conversations.ts
+++ b/ts/models/conversations.ts
@@ -2119,12 +2119,14 @@ export class ConversationModel extends window.Backbone.Model<
   async handleMessageSendResult(
     failoverIdentifiers: Array<string> | undefined,
     unidentifiedDeliveries: Array<string> | undefined,
-    discoveredIdentifierPairs: Array<{
-      uuid: string | null;
-      e164: string | null;
-    }>
+    discoveredIdentifierPairs:
+      | Array<{
+          uuid: string | null;
+          e164: string | null;
+        }>
+      | undefined
   ): Promise<void> {
-    discoveredIdentifierPairs.forEach(item => {
+    (discoveredIdentifierPairs || []).forEach(item => {
       const { uuid, e164 } = item;
       window.ConversationController.ensureContactIds({
         uuid,