Skip to content

Commit

Permalink
runfix: insert group creation message to 1:1 mls after replcing
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrykBuniX committed Aug 28, 2023
1 parent 50166f3 commit b556546
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/script/conversation/ConversationRepository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1506,9 +1506,9 @@ export class ConversationRepository {
await this.eventService.moveEventsToConversation(proteusConversation.id, mlsConversation.id);
}

//TODO:
//check if this.addCreationMessage(mlsConversation, this.userState.self().isTemporaryGuest());
//is needed
if (!mlsConversation.hasCreationMessage) {
this.addCreationMessage(mlsConversation, this.userState.self().isTemporaryGuest());
}

const isActiveConversation = this.conversationState.isActiveConversation(proteusConversation);

Expand Down Expand Up @@ -1742,9 +1742,11 @@ export class ConversationRepository {
//if it's accepted, initialise conversation so it's ready to be used
if (protocol === ConversationProtocol.MLS || localMLSConversation) {
const mlsConversation = await this.initMLS1to1Conversation(otherUserId, isSupportedByTheOtherUser);

if (localProteusConversation && isProteusConversation(localProteusConversation)) {
await this.replaceProteus1to1WithMLS(localProteusConversation, mlsConversation);
}

return mlsConversation;
}

Expand Down

0 comments on commit b556546

Please sign in to comment.