Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3396429
D9536.id32224.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
D9536.id32224.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D9536: [lib] Introduce a canBeRenderedOnItsOwn boolean to message specs
Attached
Detach File
Event Timeline
Log In to Comment