Page MenuHomePhabricator

D6870.diff
No OneTemporary

D6870.diff

diff --git a/lib/shared/messages/sidebar-source-message-spec.js b/lib/shared/messages/sidebar-source-message-spec.js
--- a/lib/shared/messages/sidebar-source-message-spec.js
+++ b/lib/shared/messages/sidebar-source-message-spec.js
@@ -6,13 +6,11 @@
pushTypes,
type CreateMessageInfoParams,
type MessageSpec,
- type NotificationTextsParams,
type RawMessageInfoFromServerDBRowParams,
} from './message-spec.js';
-import { assertSingleMessageInfo, joinResult } from './utils.js';
+import { joinResult } from './utils.js';
import type { PlatformDetails } from '../../types/device-types.js';
import type {
- MessageInfo,
RawSidebarSourceMessageInfo,
SidebarSourceMessageData,
SidebarSourceMessageInfo,
@@ -21,7 +19,6 @@
import { messageTypes } from '../../types/message-types.js';
import type { RawUnsupportedMessageInfo } from '../../types/messages/unsupported.js';
import type { NotifTexts } from '../../types/notif-types.js';
-import type { ThreadInfo } from '../../types/thread-types.js';
import type { RelativeUserInfo } from '../../types/user-types.js';
import { hasMinCodeVersion } from '../version-utils.js';
@@ -137,7 +134,6 @@
rawMessageInfo: RawSidebarSourceMessageInfo,
platformDetails: ?PlatformDetails,
): RawSidebarSourceMessageInfo | RawUnsupportedMessageInfo {
- // TODO determine min code version
if (
hasMinCodeVersion(platformDetails, 75) &&
rawMessageInfo.sourceMessage
@@ -164,18 +160,11 @@
return unwrapped;
},
- async notificationTexts(
- messageInfos: $ReadOnlyArray<MessageInfo>,
- threadInfo: ThreadInfo,
- params: NotificationTextsParams,
- ): Promise<NotifTexts> {
- const messageInfo = assertSingleMessageInfo(messageInfos);
+ notificationTexts(): Promise<NotifTexts> {
invariant(
- messageInfo.type === messageTypes.SIDEBAR_SOURCE,
- 'messageInfo should be messageTypes.SIDEBAR_SOURCE!',
+ false,
+ 'SIDEBAR_SOURCE notificationTexts should never be called directly!',
);
- const sourceMessageInfo = messageInfo.sourceMessage;
- return await params.notificationTexts([sourceMessageInfo], threadInfo);
},
notificationCollapseKey(rawMessageInfo: RawSidebarSourceMessageInfo): string {

File Metadata

Mime Type
text/plain
Expires
Sun, Dec 22, 11:34 PM (13 h, 59 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2692885
Default Alt Text
D6870.diff (2 KB)

Event Timeline