Skip to content

Commit

Permalink
runfix: Make sure newly created 1to1 conversation have updated user e…
Browse files Browse the repository at this point in the history
…ntities (#17278) (#17414)

Co-authored-by: Thomas Belin <thomasbelin4@gmail.com>
  • Loading branch information
PatrykBuniX and atomrc committed May 16, 2024
1 parent 8dfc2cd commit 4d59662
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/script/conversation/ConversationRepository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1311,7 +1311,9 @@ export class ConversationRepository {
const connection = user.connection();
if (connection) {
this.logger.log(`There's a connection with user ${userId.id}, getting a 1:1 conversation for the connection`);
return this.get1to1ConversationForConnection(connection, options);
const conversation = await this.get1to1ConversationForConnection(connection, options);
// In case we got a conversation back, we make sure the participating user entities are up to date
return conversation ? this.updateParticipatingUserEntities(conversation) : null;
}

const {protocol, isMLSSupportedByTheOtherUser, isProteusSupportedByTheOtherUser} =
Expand Down

0 comments on commit 4d59662

Please sign in to comment.