Changeset View
Changeset View
Standalone View
Standalone View
lib/shared/messages/change-settings-message-spec.js
// @flow | // @flow | ||||
import invariant from 'invariant'; | import invariant from 'invariant'; | ||||
import { | import { | ||||
pushTypes, | pushTypes, | ||||
type MessageSpec, | type MessageSpec, | ||||
type RobotextParams, | type RobotextParams, | ||||
} from './message-spec.js'; | } 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 { | ||||
ChangeSettingsMessageData, | type ChangeSettingsMessageData, | ||||
ChangeSettingsMessageInfo, | type ChangeSettingsMessageInfo, | ||||
RawChangeSettingsMessageInfo, | type RawChangeSettingsMessageInfo, | ||||
rawChangeSettingsMessageInfoValidator, | |||||
} from '../../types/messages/change-settings.js'; | } from '../../types/messages/change-settings.js'; | ||||
import type { NotifTexts } from '../../types/notif-types.js'; | import type { NotifTexts } from '../../types/notif-types.js'; | ||||
import { assertThreadType } from '../../types/thread-types.js'; | import { assertThreadType } from '../../types/thread-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 { ET, type EntityText } from '../../utils/entity-text.js'; | import { ET, type EntityText } from '../../utils/entity-text.js'; | ||||
import { validHexColorRegex } from '../account-utils.js'; | import { validHexColorRegex } from '../account-utils.js'; | ||||
import { notifRobotextForMessageInfo } from '../notif-utils.js'; | import { notifRobotextForMessageInfo } from '../notif-utils.js'; | ||||
▲ Show 20 Lines • Show All 140 Lines • ▼ Show 20 Lines | return joinResult( | ||||
rawMessageInfo.type, | rawMessageInfo.type, | ||||
rawMessageInfo.threadID, | rawMessageInfo.threadID, | ||||
rawMessageInfo.creatorID, | rawMessageInfo.creatorID, | ||||
rawMessageInfo.field, | rawMessageInfo.field, | ||||
); | ); | ||||
}, | }, | ||||
generatesNotifs: async () => pushTypes.NOTIF, | generatesNotifs: async () => pushTypes.NOTIF, | ||||
validator: rawChangeSettingsMessageInfoValidator, | |||||
}); | }); |