Lets users send stories to groups
This commit is contained in:
parent
d4b74db05c
commit
ccc89545c5
21 changed files with 1177 additions and 400 deletions
|
@ -195,6 +195,7 @@ export type ConversationType = {
|
|||
groupVersion?: 1 | 2;
|
||||
groupId?: string;
|
||||
groupLink?: string;
|
||||
isGroupStorySendReady?: boolean;
|
||||
messageRequestsEnabled?: boolean;
|
||||
acceptedMessageRequest: boolean;
|
||||
secretParams?: string;
|
||||
|
@ -852,6 +853,7 @@ export const actions = {
|
|||
showConversation,
|
||||
startComposing,
|
||||
startSettingGroupMetadata,
|
||||
tagGroupsAsNewGroupStory,
|
||||
toggleAdmin,
|
||||
toggleConversationInChooseMembers,
|
||||
toggleComposeEditingAvatar,
|
||||
|
@ -1953,6 +1955,29 @@ function removeMemberFromGroup(
|
|||
};
|
||||
}
|
||||
|
||||
function tagGroupsAsNewGroupStory(
|
||||
conversationIds: Array<string>
|
||||
): ThunkAction<void, RootStateType, unknown, NoopActionType> {
|
||||
return async dispatch => {
|
||||
await Promise.all(
|
||||
conversationIds.map(async conversationId => {
|
||||
const conversation = window.ConversationController.get(conversationId);
|
||||
if (!conversation) {
|
||||
return;
|
||||
}
|
||||
|
||||
conversation.set({ isGroupStorySendReady: true });
|
||||
await window.Signal.Data.updateConversation(conversation.attributes);
|
||||
})
|
||||
);
|
||||
|
||||
dispatch({
|
||||
type: 'NOOP',
|
||||
payload: null,
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
function toggleAdmin(
|
||||
conversationId: string,
|
||||
contactId: string
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue