Changeset View
Changeset View
Standalone View
Standalone View
lib/shared/messages/join-thread-message-spec.js
// @flow | // @flow | ||||
import invariant from 'invariant'; | import invariant from 'invariant'; | ||||
import type { MessageSpec, RobotextParams } from './message-spec.js'; | import type { MessageSpec, RobotextParams } from './message-spec.js'; | ||||
import { joinResult } from './utils.js'; | import { joinResult } from './utils.js'; | ||||
import { messageTypes } from '../../types/message-types-enum.js'; | import { messageTypes } from '../../types/message-types-enum.js'; | ||||
import type { | import type { | ||||
MessageInfo, | MessageInfo, | ||||
ClientDBMessageInfo, | ClientDBMessageInfo, | ||||
} from '../../types/message-types.js'; | } from '../../types/message-types.js'; | ||||
import type { | import { | ||||
JoinThreadMessageData, | type JoinThreadMessageData, | ||||
JoinThreadMessageInfo, | type JoinThreadMessageInfo, | ||||
RawJoinThreadMessageInfo, | type RawJoinThreadMessageInfo, | ||||
rawJoinThreadMessageInfoValidator, | |||||
} from '../../types/messages/join-thread.js'; | } from '../../types/messages/join-thread.js'; | ||||
import type { NotifTexts } from '../../types/notif-types.js'; | import type { NotifTexts } from '../../types/notif-types.js'; | ||||
import type { ThreadInfo } from '../../types/thread-types.js'; | import type { ThreadInfo } from '../../types/thread-types.js'; | ||||
import type { RelativeUserInfo } from '../../types/user-types.js'; | import type { RelativeUserInfo } from '../../types/user-types.js'; | ||||
import { | import { | ||||
ET, | ET, | ||||
type EntityText, | type EntityText, | ||||
pluralizeEntityText, | pluralizeEntityText, | ||||
▲ Show 20 Lines • Show All 90 Lines • ▼ Show 20 Lines | ): Promise<NotifTexts> { | ||||
}; | }; | ||||
}, | }, | ||||
notificationCollapseKey(rawMessageInfo: RawJoinThreadMessageInfo): string { | notificationCollapseKey(rawMessageInfo: RawJoinThreadMessageInfo): string { | ||||
return joinResult(rawMessageInfo.type, rawMessageInfo.threadID); | return joinResult(rawMessageInfo.type, rawMessageInfo.threadID); | ||||
}, | }, | ||||
generatesNotifs: async () => undefined, | generatesNotifs: async () => undefined, | ||||
validator: rawJoinThreadMessageInfoValidator, | |||||
}); | }); |