Page MenuHomePhabricator

D5689.id19148.diff
No OneTemporary

D5689.id19148.diff

diff --git a/lib/shared/message-utils.js b/lib/shared/message-utils.js
--- a/lib/shared/message-utils.js
+++ b/lib/shared/message-utils.js
@@ -290,16 +290,24 @@
});
}
+function reactionMessagePreview(): string {
+ return 'liked a message';
+}
+
function messagePreviewText(
messageInfo: PreviewableMessageInfo,
threadInfo: ThreadInfo,
): string {
if (
messageInfo.type === messageTypes.IMAGES ||
- messageInfo.type === messageTypes.MULTIMEDIA
+ messageInfo.type === messageTypes.MULTIMEDIA ||
+ messageInfo.type === messageTypes.REACTION
) {
const creator = stringForUser(messageInfo.creator);
- const preview = multimediaMessagePreview(messageInfo);
+ const preview =
+ messageInfo.type === messageTypes.REACTION
+ ? reactionMessagePreview()
+ : multimediaMessagePreview(messageInfo);
return `${creator} ${preview}`;
}
return robotextToRawString(robotextForMessageInfo(messageInfo, threadInfo));
diff --git a/lib/types/message-types.js b/lib/types/message-types.js
--- a/lib/types/message-types.js
+++ b/lib/types/message-types.js
@@ -327,7 +327,9 @@
| CreateSidebarMessageInfo;
export type PreviewableMessageInfo =
| RobotextMessageInfo
- | MultimediaMessageInfo;
+ | MultimediaMessageInfo
+ | ReactionMessageInfo;
+
export type SidebarSourceMessageInfo = {
+type: 17,
+id: string,

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 25, 7:48 AM (21 h, 10 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2578956
Default Alt Text
D5689.id19148.diff (1 KB)

Event Timeline