Page MenuHomePhabricator

D9536.id32224.diff
No OneTemporary

D9536.id32224.diff

diff --git a/lib/shared/message-utils.test.js b/lib/shared/message-utils.test.js
--- a/lib/shared/message-utils.test.js
+++ b/lib/shared/message-utils.test.js
@@ -729,4 +729,22 @@
expect(shouldBeInvalidPinSource).toBe(true);
expect(canBePinned).toBe(false);
});
+
+ describe('canBeRenderedIndependently', () => {
+ it('should return false for RawReactionMessageInfo', () => {
+ const messageSpec = messageSpecs[messageTypes.REACTION];
+
+ const canBeRenderedIndependently = messageSpec.canBeRenderedIndependently;
+
+ expect(canBeRenderedIndependently).toBe(false);
+ });
+
+ it('should return false for RawEditMessageInfo', () => {
+ const messageSpec = messageSpecs[messageTypes.EDIT_MESSAGE];
+
+ const canBeRenderedIndependently = messageSpec.canBeRenderedIndependently;
+
+ expect(canBeRenderedIndependently).toBe(false);
+ });
+ });
});
diff --git a/lib/shared/messages/edit-message-spec.js b/lib/shared/messages/edit-message-spec.js
--- a/lib/shared/messages/edit-message-spec.js
+++ b/lib/shared/messages/edit-message-spec.js
@@ -144,5 +144,7 @@
canBePinned: false,
+ canBeRenderedIndependently: false,
+
validator: rawEditMessageInfoValidator,
});
diff --git a/lib/shared/messages/message-spec.js b/lib/shared/messages/message-spec.js
--- a/lib/shared/messages/message-spec.js
+++ b/lib/shared/messages/message-spec.js
@@ -115,6 +115,7 @@
+includedInRepliesCount?: boolean,
+canBeSidebarSource: boolean,
+canBePinned: boolean,
+ +canBeRenderedIndependently?: boolean,
+useCreationSideEffectsFunc?: () => CreationSideEffectsFunc<RawInfo>,
+validator: TType<RawInfo>,
};
diff --git a/lib/shared/messages/reaction-message-spec.js b/lib/shared/messages/reaction-message-spec.js
--- a/lib/shared/messages/reaction-message-spec.js
+++ b/lib/shared/messages/reaction-message-spec.js
@@ -222,5 +222,7 @@
canBePinned: false,
+ canBeRenderedIndependently: false,
+
validator: rawReactionMessageInfoValidator,
});

File Metadata

Mime Type
text/plain
Expires
Mon, Dec 2, 12:18 PM (17 h, 52 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2607474
Default Alt Text
D9536.id32224.diff (1 KB)

Event Timeline