Changeset View
Changeset View
Standalone View
Standalone View
lib/shared/messages/leave-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 { | ||||
LeaveThreadMessageData, | type LeaveThreadMessageData, | ||||
LeaveThreadMessageInfo, | type LeaveThreadMessageInfo, | ||||
RawLeaveThreadMessageInfo, | type RawLeaveThreadMessageInfo, | ||||
rawLeaveThreadMessageInfoValidator, | |||||
} from '../../types/messages/leave-thread.js'; | } from '../../types/messages/leave-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: RawLeaveThreadMessageInfo): string { | notificationCollapseKey(rawMessageInfo: RawLeaveThreadMessageInfo): string { | ||||
return joinResult(rawMessageInfo.type, rawMessageInfo.threadID); | return joinResult(rawMessageInfo.type, rawMessageInfo.threadID); | ||||
}, | }, | ||||
generatesNotifs: async () => undefined, | generatesNotifs: async () => undefined, | ||||
validator: rawLeaveThreadMessageInfoValidator, | |||||
}); | }); |