Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3351233
D6966.id23538.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D6966.id23538.diff
View Options
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
@@ -278,6 +278,7 @@
+robotext: EntityText,
+threadCreatedFromMessage: ?ThreadInfo,
+reactions: ReactionInfo,
+ +hasBeenEdited: boolean,
};
export type ChatMessageInfoItem =
| RobotextChatMessageInfoItem
@@ -291,6 +292,7 @@
endsCluster: boolean,
+threadCreatedFromMessage: ?ThreadInfo,
+reactions: ReactionInfo,
+ +hasBeenEdited: boolean,
};
export type ChatMessageItem = { itemType: 'loader' } | ChatMessageInfoItem;
@@ -397,13 +399,18 @@
continue;
}
+ let hasBeenEdited = false;
if (
originalMessageInfo.type === messageTypes.TEXT &&
originalMessageInfo.id
) {
const newText = targetMessageEditMap.get(originalMessageInfo.id);
if (newText !== undefined) {
- originalMessageInfo = { ...originalMessageInfo, text: newText };
+ hasBeenEdited = true;
+ originalMessageInfo = {
+ ...originalMessageInfo,
+ text: newText,
+ };
}
}
@@ -489,6 +496,7 @@
endsCluster: false,
threadCreatedFromMessage,
reactions: renderedReactions,
+ hasBeenEdited,
});
} else {
invariant(
@@ -511,6 +519,7 @@
threadCreatedFromMessage,
robotext,
reactions: renderedReactions,
+ hasBeenEdited,
});
}
lastMessageInfo = originalMessageInfo;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 24, 12:36 AM (19 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2573277
Default Alt Text
D6966.id23538.diff (1 KB)
Attached To
Mode
D6966: [lib] Add 'hasBeenEdited' status to messages
Attached
Detach File
Event Timeline
Log In to Comment