Skip to content
New issue

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

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

Already on GitHub? # to your account

#64 ⁃ Ensure direct chats don't have more than two accounts before sending E2EE verification messages #248

Open
famedly-bot opened this issue Nov 13, 2021 · 4 comments · May be fixed by #2030
Assignees
Labels
bug Something isn't working

Comments

@famedly-bot
Copy link

In GitLab by @Mikaela on Nov 13, 2021, 11:42

Soru requested me to report that verification messages should ensure direct chat doesn't have more than two users as it just kept failing due to sending messages to room of more users with other devices sending reject messages. I commonly have three or more accounts in direct chats and consider private rooms between just a few people as direct chats.

@famedly-bot
Copy link
Author

In GitLab by @h.carnot on Apr 6, 2022, 17:48

This was discussed but for record:

The spec doesn't specify the number of user that are allowed in a room where we send a E2EE verification message.
The only problem is that you are going to verify the first user who accept the user verification request.

@Mar-Ga
Copy link

Mar-Ga commented Jul 27, 2023

@famedly/instant-messaging is this still an issue or can we close this

@nikzen nikzen closed this as completed Oct 11, 2023
@nico-famedly
Copy link
Member

No, this is still an issue:

final roomId = await client.startDirectChat(

That call to startDirectChat might return an existing DM where someone else got invited to.

@nico-famedly nico-famedly reopened this Oct 12, 2023
@krille-chan
Copy link
Contributor

So to fix this I would suggest that we change the method startDirectChat() with a new optional parameter like this:

  /// Returns an existing direct room ID with this user or creates a new one.
  /// By default encryption will be enabled if the client supports encryption
  /// and the other user has uploaded any encryption keys.
  Future<String> startDirectChat(
    String mxid, {
    bool? enableEncryption,
    List<StateEvent>? initialState,
    bool waitForSync = true,
    Map<String, dynamic>? powerLevelContentOverride,
    CreateRoomPreset? preset = CreateRoomPreset.trustedPrivateChat,

    /// Does not return existing DM rooms which have more than two members.
    bool ensureIsOnlyTwoMembers = false,
  })

and then set ensureIsOnlyTwoMembers: true when using this method in startVerification() method.

# for free to join this conversation on GitHub. Already have an account? # to comment