Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: mls migration #15247

Merged
merged 78 commits into from
Nov 27, 2023
Merged
Show file tree
Hide file tree
Changes from 76 commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
cd88dae
feat: periodically check migration config [FS-1893] (#15117)
PatrykBuniX May 17, 2023
b1dd984
feat: start migration of proteus conversations [FS-1888] (#15198)
PatrykBuniX May 26, 2023
9ca3826
feat: automatically join mixed conversations [FS-1897] (#15248)
PatrykBuniX May 30, 2023
5be19cd
runfix: filter duplicated system messages (#15264)
PatrykBuniX May 30, 2023
7b3b3fe
feat: maintain mls group list during migration [WPB-1115] (#15318)
PatrykBuniX Jun 13, 2023
769e619
test: fix test
PatrykBuniX Jun 13, 2023
d07713a
feat: debug util to update migration feature team settings config
PatrykBuniX Jun 14, 2023
5c91683
refactor: reuse existing functionality of joining mls conv with ext c…
PatrykBuniX Jun 20, 2023
fe25f99
runfix: welcome message not being sent in self conversation anymore
PatrykBuniX Jun 20, 2023
3337bfe
feat: parse supported protocols (#15379)
PatrykBuniX Jun 21, 2023
0540e41
chore: bump core
PatrykBuniX Jun 22, 2023
4fd7658
runfix: wipe mls capable conversation
PatrykBuniX Jun 22, 2023
8b44c9c
runfix: don't try joining mixed conversations twice
PatrykBuniX Jun 23, 2023
205fc02
chore: fix lockfile
PatrykBuniX Jun 27, 2023
e87c709
chore: bump core
PatrykBuniX Jun 27, 2023
1866e91
runfix: fix tests
PatrykBuniX Jun 27, 2023
1a328e2
chore: fix lockfile
PatrykBuniX Jun 27, 2023
110bdd7
feat: update self supported protocols [WPB-2174] (#15399)
PatrykBuniX Jun 28, 2023
1014548
runfix: init only mls conversations
PatrykBuniX Jun 28, 2023
35353b2
feat: finalise mls migration (#15402)
PatrykBuniX Jul 3, 2023
d68a672
runfix: clear mls covnersation state when group not initialised properly
PatrykBuniX Jul 4, 2023
b509826
Merge branch 'dev' into feat/mls-migration
PatrykBuniX Jul 4, 2023
e8b6c78
test: fix tests
PatrykBuniX Jul 4, 2023
5fc5641
runfix: do not init mls conversations twice
PatrykBuniX Jul 4, 2023
7ef6dcf
feat: join mls group after migration finalisation (#15431)
PatrykBuniX Jul 7, 2023
151c47e
feat: hide mls migration under the feature flag (#15450)
PatrykBuniX Jul 10, 2023
60fc2f7
chore: bump core
PatrykBuniX Jul 13, 2023
27c488e
feat: weeksPassedSinceDate time util
PatrykBuniX Jul 14, 2023
26c3e8f
feat: filter out inactive clients
PatrykBuniX Jul 14, 2023
8947ee8
refactor: rename mls migration flag
PatrykBuniX Jul 14, 2023
27e5e8f
Merge branch 'dev' into feat/mls-migration
PatrykBuniX Jul 17, 2023
3d4e26f
test: fix tests
PatrykBuniX Jul 17, 2023
6a62964
chore: add todo comment
PatrykBuniX Jul 17, 2023
467b4c7
chore: hide receiving protocol update message under feature flag
PatrykBuniX Jul 17, 2023
9615f31
refactor: handle welcome message event
PatrykBuniX Jul 17, 2023
f09b402
refactor: mls migration (#15477)
PatrykBuniX Jul 19, 2023
a29db8d
Merge branch 'dev' into feat/mls-migration
PatrykBuniX Jul 20, 2023
d712f77
Merge branch 'dev' into feat/mls-migration
PatrykBuniX Jul 21, 2023
942cff2
Merge branch 'dev' into feat/mls-migration
PatrykBuniX Jul 26, 2023
31fa673
Merge branch 'dev' into feat/mls-migration
PatrykBuniX Aug 23, 2023
2701d34
chore: make isteam1to1 private again
PatrykBuniX Aug 23, 2023
2a02f42
Merge branch 'dev' into feat/mls-migration
PatrykBuniX Sep 5, 2023
cfacdb9
Merge branch 'dev' into feat/mls-migration
PatrykBuniX Sep 12, 2023
d3eef4f
Merge branch 'dev' into feat/mls-migration
PatrykBuniX Oct 6, 2023
a80e9fd
runfix: fix deps issue after merge
PatrykBuniX Oct 6, 2023
78ec9d1
chore: remove todo comment
PatrykBuniX Oct 6, 2023
a7d9815
refactor: move some migration logic to core package
PatrykBuniX Oct 9, 2023
43e476f
Merge branch 'dev' into feat/mls-migration
PatrykBuniX Oct 9, 2023
409c1c9
refactor: remove unused methods
PatrykBuniX Oct 10, 2023
76c6abf
refactor: narrow down mls init deps interface
PatrykBuniX Oct 10, 2023
507295d
refactor: narrow down mls finalise dependencies
PatrykBuniX Oct 10, 2023
ab25ec3
refactor: init mls migration flow deps
PatrykBuniX Oct 10, 2023
3ad5ca7
Merge branch 'dev' into feat/mls-migration
PatrykBuniX Oct 11, 2023
2c996b7
feat: update copy for protocol update message
PatrykBuniX Oct 11, 2023
3827dc7
chore: bump core
PatrykBuniX Oct 11, 2023
ad3a35b
Merge branch 'dev' into feat/mls-migration
PatrykBuniX Oct 11, 2023
7c2d063
feat: update joined after migration finalisation system message
PatrykBuniX Oct 19, 2023
9363a51
Merge branch 'dev' into feat/mls-migration
PatrykBuniX Oct 19, 2023
d6a6950
Merge branch 'dev' into feat/mls-migration
PatrykBuniX Oct 24, 2023
5edac1f
Merge branch 'dev' into feat/mls-migration
PatrykBuniX Oct 31, 2023
fbb1008
runfix: system message after merge
PatrykBuniX Oct 31, 2023
5197fd5
Merge branch 'dev' into feat/mls-migration
PatrykBuniX Nov 3, 2023
f0a3c3b
runfix: joining after migration is finalised
PatrykBuniX Nov 6, 2023
6228ff5
Merge branch 'dev' into feat/mls-migration
PatrykBuniX Nov 10, 2023
7699018
Merge branch 'dev' into feat/mls-migration
PatrykBuniX Nov 14, 2023
e0ee879
Merge branch 'dev' into feat/mls-migration
PatrykBuniX Nov 14, 2023
e8278a7
Merge branch 'dev' into feat/mls-migration
PatrykBuniX Nov 15, 2023
b7917f7
feat: inject system message ongoing call on migration finalisation
PatrykBuniX Nov 15, 2023
2ae102c
test: inject migration finalisation when call is ongoing
PatrykBuniX Nov 15, 2023
b7d8014
runfix: insert system message only for active call
PatrykBuniX Nov 15, 2023
fba7fd4
Merge branch 'dev' into feat/mls-migration
PatrykBuniX Nov 17, 2023
c198f20
runfix: initial protocol optional
PatrykBuniX Nov 17, 2023
0b6ddb7
Merge branch 'dev' into feat/mls-migration
PatrykBuniX Nov 20, 2023
e53fcfb
Merge branch 'dev' into feat/mls-migration
PatrykBuniX Nov 22, 2023
2b2dfe5
runfix: remove mls migration feature flag
PatrykBuniX Nov 22, 2023
0208ef5
refactor: join after finalisation deps
PatrykBuniX Nov 22, 2023
c5ddabc
refactor: improve naming - cr suggestions
PatrykBuniX Nov 27, 2023
e2b536b
refactor: rename files
PatrykBuniX Nov 27, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions server/config/client.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,11 @@
SHOW_LOADING_INFORMATION: env.FEATURE_SHOW_LOADING_INFORMATION == 'true',
USE_CORE_CRYPTO: env.FEATURE_USE_CORE_CRYPTO == 'true',
MAX_USERS_TO_PING_WITHOUT_ALERT:
(env.FEATURE_MAX_USERS_TO_PING_WITHOUT_ALERT && Number(env.FEATURE_MAX_USERS_TO_PING_WITHOUT_ALERT)) || 4,

Check warning on line 74 in server/config/client.config.ts

View workflow job for this annotation

GitHub Actions / lint

No magic number: 4
},
MAX_GROUP_PARTICIPANTS: (env.MAX_GROUP_PARTICIPANTS && Number(env.MAX_GROUP_PARTICIPANTS)) || 500,

Check warning on line 76 in server/config/client.config.ts

View workflow job for this annotation

GitHub Actions / lint

No magic number: 500
MAX_VIDEO_PARTICIPANTS: (env.MAX_VIDEO_PARTICIPANTS && Number(env.MAX_VIDEO_PARTICIPANTS)) || 4,

Check warning on line 77 in server/config/client.config.ts

View workflow job for this annotation

GitHub Actions / lint

No magic number: 4
NEW_PASSWORD_MINIMUM_LENGTH: (env.NEW_PASSWORD_MINIMUM_LENGTH && Number(env.NEW_PASSWORD_MINIMUM_LENGTH)) || 8,

Check warning on line 78 in server/config/client.config.ts

View workflow job for this annotation

GitHub Actions / lint

No magic number: 8
URL: {
ACCOUNT_BASE: env.URL_ACCOUNT_BASE,
MOBILE_BASE: env.URL_MOBILE_BASE,
Expand All @@ -93,6 +93,7 @@
INDEX: env.URL_SUPPORT_INDEX,
LEGAL_HOLD_BLOCK: env.URL_SUPPORT_LEGAL_HOLD_BLOCK,
MICROPHONE_ACCESS_DENIED: env.URL_SUPPORT_MICROPHONE_ACCESS_DENIED,
MLS_LEARN_MORE: env.URL_SUPPORT_MLS_LEARN_MORE,
PRIVACY_VERIFY_FINGERPRINT: env.URL_SUPPORT_PRIVACY_VERIFY_FINGERPRINT,
SCREEN_ACCESS_DENIED: env.URL_SUPPORT_SCREEN_ACCESS_DENIED,
NON_FEDERATING_INFO: env.URL_SUPPORT_NON_FEDERATING_INFO,
Expand Down
2 changes: 2 additions & 0 deletions server/config/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,8 @@ export type Env = {

URL_SUPPORT_LEGAL_HOLD_BLOCK: string;

URL_SUPPORT_MLS_LEARN_MORE: string;

URL_SUPPORT_MICROPHONE_ACCESS_DENIED: string;

URL_SUPPORT_PRIVACY_VERIFY_FINGERPRINT: string;
Expand Down
15 changes: 10 additions & 5 deletions src/__mocks__/@wireapp/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,14 @@ export class Account extends EventEmitter {
service = {
mls: {
schedulePeriodicKeyMaterialRenewals: jest.fn(),
addUsersToExistingConversation: jest.fn(),
conversationExists: jest.fn(),
wipeConversation: jest.fn(),
registerConversation: jest.fn(),
getGroupIdFromConversationId: jest.fn(),
renewKeyMaterial: jest.fn(),
getClientIds: jest.fn(),
getEpoch: jest.fn(),
conversationExists: jest.fn(),
exportSecretKey: jest.fn(),
on: this.on,
emit: this.emit,
Expand All @@ -56,13 +58,16 @@ export class Account extends EventEmitter {
mlsGroupExistsLocally: jest.fn(),
joinByExternalCommit: jest.fn(),
addUsersToMLSConversation: jest.fn(),
isMLSGroupEstablishedLocally: jest.fn(),
establishMLS1to1Conversation: jest.fn(),
removeUserFromConversation: jest.fn(),
removeUsersFromMLSConversation: jest.fn(),
wipeMLSConversation: jest.fn(),
addUsersToProteusConversation: jest.fn(),
messageTimer: {
setConversationLevelTimer: jest.fn(),
},
removeUsersFromMLSConversation: jest.fn(),
removeUserFromConversation: jest.fn(),
tryEstablishingMLSGroup: jest.fn(),
isMLSGroupEstablishedLocally: jest.fn(),
establishMLS1to1Conversation: jest.fn(),
blacklistConversation: jest.fn(),
removeConversationFromBlacklist: jest.fn(),
},
Expand Down
5 changes: 5 additions & 0 deletions src/i18n/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,8 @@
"conversationMemberWereRemoved": "{{users}} were removed from the conversation",
"conversationMessageDelivered": "Delivered",
"conversationMissedMessages": "You haven’t used this device for a while. Some messages may not appear here.",
"conversationJoinedAfterMLSMigrationFinalisation": "You haven’t updated this device for a while. In the meantime, the standard messaging protocol changed from Proteus to Messaging Layer Security (MLS). Due to this change, some messages may not appear here. [link]Learn more about MLS[/link]",
"conversationMLSMigrationFinalisationOngoingCall": "Due to migration to MLS, you might have issues with your current call. If that's the case, hang up and call again.",
"conversationModalRestrictedFileSharingDescription": "This file could not be shared due to your file sharing restrictions.",
"conversationModalRestrictedFileSharingHeadline": "File sharing restrictions",
"conversationMultipleMembersRemovedMissingLegalHoldConsent": "{{users}} were removed from this conversation because legal hold has been activated. [link]Learn more[/link]",
Expand Down Expand Up @@ -482,6 +484,9 @@
"conversationYouAccusative": "you",
"conversationYouDative": "you",
"conversationYouNominative": "you",
"conversationProtocolUpdatedToMixedPart1": "The standard messaging protocol is changing from Proteus to the new Messaging Layer Security (MLS). [link]Learn more about MLS[/link]",
"conversationProtocolUpdatedToMixedPart2": "Ensure you use the latest version of Wire to be ready for MLS and continue communicating seamlessly.",
"conversationProtocolUpdatedToMLS": "This conversation now uses the new Messaging Layer Security (MLS) protocol. To communicate seamlessly, always use the latest version of Wire on your devices. [link]Learn more about MLS[/link]",
"conversationYouRemovedMissingLegalHoldConsent": "[bold]You[/bold] were removed from this conversation because legal hold has been activated. [link]Learn more[/link]",
"conversationsAllArchived": "Everything archived",
"conversationsConnectionRequestMany": "{{number}} people waiting",
Expand Down
5 changes: 3 additions & 2 deletions src/script/backup/BackupRepository.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,11 +200,12 @@ describe('BackupRepository', () => {
it('successfully imports a backup', async () => {
const [backupRepository, {backupService, conversationRepository}] = await buildBackupRepository();
const user = new User('user1');
jest.spyOn(backupService, 'getDatabaseVersion').mockReturnValue(15);
const mockedDBVersion = 20;
jest.spyOn(backupService, 'getDatabaseVersion').mockReturnValue(mockedDBVersion);
const importSpy = jest.spyOn(backupService, 'importEntities').mockResolvedValue(1);
const users = [generateAPIUser(), generateAPIUser()];

const metadata = {...backupRepository.createMetaData(user, 'client1'), version: 15};
const metadata = {...backupRepository.createMetaData(user, 'client1'), version: mockedDBVersion};

const files = {
[Filename.METADATA]: JSON.stringify(metadata),
Expand Down
4 changes: 4 additions & 0 deletions src/script/calling/Call.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ export class Call {
public currentPage: ko.Observable<number> = ko.observable(0);
public pages: ko.ObservableArray<Participant[]> = ko.observableArray();
readonly maximizedParticipant: ko.Observable<Participant | null>;
public readonly isActive: ko.PureComputed<boolean>;

private readonly audios: Record<string, {audioElement: HTMLAudioElement; stream: MediaStream}> = {};
/**
Expand Down Expand Up @@ -97,6 +98,9 @@ export class Call {
this.muteState(isMuted ? MuteState.SELF_MUTED : MuteState.NOT_MUTED);
this.isConference = [CONV_TYPE.CONFERENCE, CONV_TYPE.CONFERENCE_MLS].includes(this.conversationType);
this.isGroupOrConference = this.isConference || this.conversationType === CONV_TYPE.GROUP;
this.isActive = ko.pureComputed(() =>
[CALL_STATE.OUTGOING, CALL_STATE.ANSWERED, CALL_STATE.MEDIA_ESTAB].includes(this.state()),
);
}

get hasWorkingAudioInput(): boolean {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,10 @@ export const MessageWrapper: React.FC<MessageParams & {hasMarker: boolean; isMes
if (message.isFileTypeRestricted()) {
return <FileTypeRestrictedMessage message={message} />;
}

if (message.isMissed()) {
return <MissedMessage />;
}

return null;
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
/*
* Wire
* Copyright (C) 2023 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 {ConversationProtocol} from '@wireapp/api-client/lib/conversation';

import {Icon} from 'Components/Icon';
import {Config} from 'src/script/Config';
import {ProtocolUpdateMessage as ProtocolUpdateMessageEntity} from 'src/script/entity/message/ProtocolUpdateMessage';
import {SystemMessage} from 'src/script/entity/message/SystemMessage';
import {replaceLink, t} from 'Util/LocalizerUtil';

import {SystemMessageBase} from '../SystemMessage/SystemMessageBase';

interface ProtocolUpdateMessageProps {
message: ProtocolUpdateMessageEntity;
}

const createSystemMessage = (caption: string) => {
const message = new SystemMessage();
message.caption = caption;
return message;
};

export const ProtocolUpdateMessage = ({message}: ProtocolUpdateMessageProps) => {
if (message.protocol === ConversationProtocol.MIXED) {
const captions = [
t('conversationProtocolUpdatedToMixedPart1', {}, replaceLink(Config.getConfig().URL.SUPPORT.MLS_LEARN_MORE)),
t('conversationProtocolUpdatedToMixedPart2'),
];
const messages = captions.map(createSystemMessage);
return (
<>
{messages.map(message => (
<SystemMessageBase key={message.caption} icon={<Icon.Info />} message={message} />
))}
</>
);
}

const migratedToMLSMessage = createSystemMessage(
t('conversationProtocolUpdatedToMLS', {}, replaceLink(Config.getConfig().URL.SUPPORT.MLS_LEARN_MORE)),
);
return <SystemMessageBase message={migratedToMLSMessage} icon={<Icon.Info />} />;
atomrc marked this conversation as resolved.
Show resolved Hide resolved
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* Wire
* Copyright (C) 2023 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/.
*
*/

export * from './ProtocolUpdateMessage';
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,19 @@
import React from 'react';

import {Icon} from 'Components/Icon';
import {JoinedAfterMLSMigrationFinalisationMessage} from 'src/script/entity/message/JoinedAfterMLSMigrationFinalisationMessage';
import {MessageTimerUpdateMessage} from 'src/script/entity/message/MessageTimerUpdateMessage';
import {MLSConversationRecoveredMessage} from 'src/script/entity/message/MLSConversationRecoveredMessage';
import {MLSMigrationFinalisationOngoingCallMessage} from 'src/script/entity/message/MLSMigrationFinalisationOngoingCallMessage';
import {ProtocolUpdateMessage} from 'src/script/entity/message/ProtocolUpdateMessage';
import {ReceiptModeUpdateMessage} from 'src/script/entity/message/ReceiptModeUpdateMessage';
import {RenameMessage} from 'src/script/entity/message/RenameMessage';
import {SystemMessage as SystemMessageEntity} from 'src/script/entity/message/SystemMessage';

import {SystemMessageBase} from './SystemMessageBase';

import {ProtocolUpdateMessage as ProtocolUpdateMessageComponent} from '../ProtocolUpdateMessage';

export interface SystemMessageProps {
message: SystemMessageEntity;
}
Expand All @@ -54,5 +59,17 @@ export const SystemMessage: React.FC<SystemMessageProps> = ({message}) => {
return <SystemMessageBase message={message} icon={<Icon.Info />} />;
}

if (message instanceof ProtocolUpdateMessage) {
return <ProtocolUpdateMessageComponent message={message} />;
}

if (message instanceof JoinedAfterMLSMigrationFinalisationMessage) {
return <SystemMessageBase message={message} icon={<Icon.Info />} />;
}

if (message instanceof MLSMigrationFinalisationOngoingCallMessage) {
return <SystemMessageBase message={message} icon={<Icon.Info />} />;
}

return <SystemMessageBase message={message} />;
};
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ export const SystemMessageBase: React.FC<SystemMessageProps> = ({message, isSend
<p className="message-header-label">
<span className="message-header-label__multiline">
{isSenderNameVisible && <span className="message-header-sender-name">{unsafeSenderName}</span>}
{message.caption && <span className="ellipsis">{message.caption}</span>}
{message.caption && (
<span className="system-message-caption ellipsis" dangerouslySetInnerHTML={{__html: message.caption}} />
)}
Comment on lines +42 to +44
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

out of scope: This is probably not for this PR, but in the future, we should try to move this caption for the entity to the react component layer and render it a pure React node (not innerHTML)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noted, will think about that 👌

</span>
</p>
<div className="message-body-actions">
Expand Down
2 changes: 2 additions & 0 deletions src/script/conversation/ConversationFilter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ describe('ConversationFilter', () => {
name: 'Florian@Staging11',
others: ['71e25be1-5433-4647-964d-03a5d9e7c970'],
protocol: ConversationProtocol.PROTEUS,
initial_protocol: ConversationProtocol.PROTEUS,
qualified_others: undefined,
receipt_mode: null,
roles: {},
Expand Down Expand Up @@ -116,6 +117,7 @@ describe('ConversationFilter', () => {
muted_timestamp: 0,
name: 'Florian@Staging11',
others: ['71e25be1-5433-4647-964d-03a5d9e7c970'],
initial_protocol: ConversationProtocol.PROTEUS,
protocol: ConversationProtocol.PROTEUS,
qualified_others: undefined,
receipt_mode: null,
Expand Down
17 changes: 15 additions & 2 deletions src/script/conversation/ConversationMapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,20 @@ export class ConversationMapper {
throw new ConversationError(BASE_ERROR_TYPE.INVALID_PARAMETER, BaseError.MESSAGE.INVALID_PARAMETER);
}

const {creator, id, members, name, others, qualified_others, type, group_id, epoch, protocol, cipher_suite} =
conversationData;
const {
creator,
id,
members,
name,
others,
qualified_others,
type,
group_id,
epoch,
protocol,
cipher_suite,
initial_protocol,
} = conversationData;

let conversationEntity = new Conversation(
id,
Expand All @@ -246,6 +258,7 @@ export class ConversationMapper {

conversationEntity.creator = creator;
conversationEntity.groupId = group_id;
conversationEntity.initialProtocol = initial_protocol || protocol;
conversationEntity.epoch = epoch ?? -1;
conversationEntity.cipherSuite = cipher_suite;
conversationEntity.type(type);
Expand Down
Loading
Loading