Changeset View
Changeset View
Standalone View
Standalone View
lib/shared/messages/create-sub-thread-message-spec.js
Show All 9 Lines | |||||
} from './message-spec.js'; | } from './message-spec.js'; | ||||
import { assertSingleMessageInfo } from './utils.js'; | import { assertSingleMessageInfo } from './utils.js'; | ||||
import { permissionLookup } from '../../permissions/thread-permissions.js'; | import { permissionLookup } from '../../permissions/thread-permissions.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 { | ||||
CreateSubthreadMessageData, | type CreateSubthreadMessageData, | ||||
CreateSubthreadMessageInfo, | type CreateSubthreadMessageInfo, | ||||
RawCreateSubthreadMessageInfo, | type RawCreateSubthreadMessageInfo, | ||||
rawCreateSubthreadMessageInfoValidator, | |||||
} from '../../types/messages/create-subthread.js'; | } from '../../types/messages/create-subthread.js'; | ||||
import type { NotifTexts } from '../../types/notif-types.js'; | import type { NotifTexts } from '../../types/notif-types.js'; | ||||
import { threadPermissions, threadTypes } from '../../types/thread-types.js'; | import { threadPermissions, threadTypes } 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 { notifTextsForSubthreadCreation } from '../notif-utils.js'; | import { notifTextsForSubthreadCreation } from '../notif-utils.js'; | ||||
▲ Show 20 Lines • Show All 125 Lines • ▼ Show 20 Lines | return userNotMemberOfSubthreads.has(rawMessageInfo.childThreadID) | ||||
: undefined; | : undefined; | ||||
}, | }, | ||||
threadIDs( | threadIDs( | ||||
rawMessageInfo: RawCreateSubthreadMessageInfo, | rawMessageInfo: RawCreateSubthreadMessageInfo, | ||||
): $ReadOnlyArray<string> { | ): $ReadOnlyArray<string> { | ||||
return [rawMessageInfo.childThreadID]; | return [rawMessageInfo.childThreadID]; | ||||
}, | }, | ||||
validator: rawCreateSubthreadMessageInfoValidator, | |||||
}); | }); |