Page MenuHomePhabricator

D6868.diff
No OneTemporary

D6868.diff

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

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)

Event Timeline