Changeset View
Changeset View
Standalone View
Standalone View
lib/shared/messages/text-message-spec.js
Show All 13 Lines | import { | ||||
changeThreadSettingsActionTypes, | changeThreadSettingsActionTypes, | ||||
changeThreadSettings, | changeThreadSettings, | ||||
} from '../../actions/thread-actions.js'; | } from '../../actions/thread-actions.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 { | ||||
RawTextMessageInfo, | type RawTextMessageInfo, | ||||
TextMessageData, | type TextMessageData, | ||||
TextMessageInfo, | type TextMessageInfo, | ||||
rawTextMessageInfoValidator, | |||||
} from '../../types/messages/text.js'; | } from '../../types/messages/text.js'; | ||||
import type { NotifTexts } from '../../types/notif-types.js'; | import type { NotifTexts } from '../../types/notif-types.js'; | ||||
import { threadTypes } from '../../types/thread-types.js'; | import { 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 { | import { | ||||
useDispatchActionPromise, | useDispatchActionPromise, | ||||
useServerCall, | useServerCall, | ||||
▲ Show 20 Lines • Show All 273 Lines • ▼ Show 20 Lines | ) => { | ||||
threadID: threadInfo.id, | threadID: threadInfo.id, | ||||
changes: { newMemberIDs }, | changes: { newMemberIDs }, | ||||
}); | }); | ||||
dispatchActionPromise(changeThreadSettingsActionTypes, addMembersPromise); | dispatchActionPromise(changeThreadSettingsActionTypes, addMembersPromise); | ||||
await addMembersPromise; | await addMembersPromise; | ||||
}; | }; | ||||
}, | }, | ||||
validator: rawTextMessageInfoValidator, | |||||
}); | }); |