Page MenuHomePhabricator

D6965.id23981.diff
No OneTemporary

D6965.id23981.diff

diff --git a/lib/selectors/chat-selectors.js b/lib/selectors/chat-selectors.js
--- a/lib/selectors/chat-selectors.js
+++ b/lib/selectors/chat-selectors.js
@@ -367,6 +367,15 @@
}
}
+ const targetMessageEditMap = new Map<string, string>();
+ for (let i = messages.length - 1; i >= 0; i--) {
+ const messageInfo = messages[i];
+ if (messageInfo.type !== messageTypes.EDIT_MESSAGE) {
+ continue;
+ }
+ targetMessageEditMap.set(messageInfo.targetMessageID, messageInfo.text);
+ }
+
const chatMessageItems = [];
let lastMessageInfo = null;
for (let i = messages.length - 1; i >= 0; i--) {
@@ -379,7 +388,7 @@
continue;
}
- const originalMessageInfo =
+ let originalMessageInfo =
messageInfo.type === messageTypes.SIDEBAR_SOURCE
? messageInfo.sourceMessage
: messageInfo;
@@ -388,6 +397,16 @@
continue;
}
+ if (
+ originalMessageInfo.type === messageTypes.TEXT &&
+ originalMessageInfo.id
+ ) {
+ const newText = targetMessageEditMap.get(originalMessageInfo.id);
+ if (newText) {
+ originalMessageInfo = { ...originalMessageInfo, text: newText };
+ }
+ }
+
let startsConversation = true;
let startsCluster = true;
if (

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 30, 9:07 PM (21 h, 25 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2602436
Default Alt Text
D6965.id23981.diff (1 KB)

Event Timeline