Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3359194
D5689.id19148.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
D5689.id19148.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D5689: [lib] modified messagePreviewText to handle reaction message types
Attached
Detach File
Event Timeline
Log In to Comment