-
Notifications
You must be signed in to change notification settings - Fork 289
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: start migration of proteus conversations [FS-1888] (#15198)
* feat: base for initialisation and finalisation methods * feat: check if migration time has arrived after mls is supported * refactor: improve init migration api * refactor: rename func * refactor: move initialisation and finalisation to separate modules * runfix: start migration flow in background after app was initialised * feat: filter unestablished mls conversations out * feat: filter out only mls conversations that are unestablished * refactor: move mls migration logger to separate file * feat: update conversation locally * chore: remove migration init code (follow-up pr) * refactor: resolve core and api client in module * feat: read feature config from teamstate * chore: update core * runfix: check fresh migration config when timer elapses * chore: update comment * refactor: use reduce for grouping conversations by protocol * refactor: simplify removal key check * feat: update core with new migration config types * refactor: improve types * feat: initialise migration of proteus conversations * feat: create mls group after switching to mixed and add other clients * runfix: send messages with mls if conversation is actually mls (not if group id exists) * chore: bump core * refactor: don't replace conversation's reference * feat: insert system message after conversation protocol update * refactor: improve reaction to protocol update event * refactor: move protocol update logic to conversation repository * feat: save conversation state to db after updating protocol * feat: update conversation protocol-related fields after protocol was updated * refactor: move adding users of conversation to separate module * refactor: move establishing group for mixed conversation to separate module * chore: update comments * runfix: don't try to to add users to mls group if mixed conv is empty * test: adding all conversation members to mls group * test: try establishing mls group for mixed conversation * chore: remove comment * test: conversation repo updateConversationProtocol * test: initialise migration of proteus conversations * refactor: CR suggestions
- Loading branch information
1 parent
1882115
commit 06859f8
Showing
25 changed files
with
975 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
src/script/components/MessagesList/Message/ProtocolUpdateMessage.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/* | ||
* Wire | ||
* Copyright (C) 2021 Wire Swiss GmbH | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see http://www.gnu.org/licenses/. | ||
* | ||
*/ | ||
|
||
import React from 'react'; | ||
|
||
import {Icon} from 'Components/Icon'; | ||
import {ProtocolUpdateMessage as ProtocolUpdateMessageEntity} from 'src/script/entity/message/ProtocolUpdateMessage'; | ||
import {useKoSubscribableChildren} from 'Util/ComponentUtil'; | ||
|
||
import {MessageTime} from './MessageTime'; | ||
|
||
export interface ProtocolUpdateMessageProps { | ||
message: ProtocolUpdateMessageEntity; | ||
} | ||
|
||
export const ProtocolUpdateMessage: React.FC<ProtocolUpdateMessageProps> = ({message}) => { | ||
const {caption, timestamp} = useKoSubscribableChildren(message, ['caption', 'timestamp']); | ||
|
||
return ( | ||
<div className="message-header" data-uie-name="element-message-protocol-update"> | ||
<div className="message-header-icon message-header-icon--svg text-foreground"> | ||
<Icon.Info /> | ||
</div> | ||
<div className="message-header-label" data-uie-name="element-message-protocol-update-text"> | ||
<p className="message-header-label__multiline"> | ||
<span className="ellipsis"> | ||
<strong>{caption}</strong> | ||
</span> | ||
</p> | ||
</div> | ||
<div className="message-body-actions"> | ||
<MessageTime timestamp={timestamp} data-uie-uid={message.id} data-uie-name="item-message-call-timestamp" /> | ||
</div> | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.