Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3513199
D6868.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
D6868.diff
View Options
diff --git a/lib/shared/messages/create-sidebar-message-spec.js b/lib/shared/messages/create-sidebar-message-spec.js
--- a/lib/shared/messages/create-sidebar-message-spec.js
+++ b/lib/shared/messages/create-sidebar-message-spec.js
@@ -7,7 +7,6 @@
type CreateMessageInfoParams,
type MessageSpec,
} from './message-spec.js';
-import { assertSingleMessageInfo } from './utils.js';
import type { PlatformDetails } from '../../types/device-types.js';
import { messageTypes } from '../../types/message-types.js';
import type {
@@ -153,7 +152,6 @@
rawMessageInfo: RawCreateSidebarMessageInfo,
platformDetails: ?PlatformDetails,
): RawCreateSidebarMessageInfo | RawUnsupportedMessageInfo {
- // TODO determine min code version
if (hasMinCodeVersion(platformDetails, 75)) {
return rawMessageInfo;
}
@@ -180,18 +178,18 @@
messageInfos: $ReadOnlyArray<MessageInfo>,
threadInfo: ThreadInfo,
): Promise<NotifTexts> {
- const messageInfo = assertSingleMessageInfo(messageInfos);
+ const firstMessageInfo = messageInfos[0];
invariant(
- messageInfo.type === messageTypes.CREATE_SIDEBAR,
- 'messageInfo should be messageTypes.CREATE_SIDEBAR!',
+ firstMessageInfo.type === messageTypes.CREATE_SIDEBAR,
+ 'firstMessageInfo should be messageTypes.CREATE_SIDEBAR!',
);
- const creator = ET.user({ userInfo: messageInfo.creator });
+ const creator = ET.user({ userInfo: firstMessageInfo.creator });
const prefix = ET`${creator}`;
- const initialName = messageInfo.initialThreadState.name;
+ const initialName = firstMessageInfo.initialThreadState.name;
const sourceMessageAuthorPossessive = ET.user({
- userInfo: messageInfo.sourceMessageAuthor,
+ userInfo: firstMessageInfo.sourceMessageAuthor,
possessive: true,
});
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Dec 22, 11:09 PM (18 h, 59 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2692810
Default Alt Text
D6868.diff (1 KB)
Attached To
Mode
D6868: [lib] Allow multiple messages in CreateSidebar notificationTexts
Attached
Detach File
Event Timeline
Log In to Comment