Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Multiple DMs are created as a ROOM. Inviting into existing DM stays a DM. #13912

Closed
yasinishyn opened this issue Sep 26, 2022 · 1 comment
Closed

Comments

@yasinishyn
Copy link
Contributor

Description

I wasn't been able to find this in the documentation, so I do not know if that is intended, but there seems to be a lack of consistency for DMs with multiple users.

When you create a DM with a single user, the "staged" room for the inviter is created under the "People" directory and under the "invites" directory for the invitee. If you create a DM where you invite more than one user,  the room is created in the "Home" or "Other rooms" under the "Rooms" directory. 
However, if you create a DM with a single user and then add people to the same room, the DM will stay under the "People" directory, and invites for all consequent users will appear under the "Invites" directory of the sidebar.

Technically, when you create a "Multiple DM" the request_content config will not have "is_direct" and as a consequence, the rooms will not be added to AccountDataTypes.DIRECT of the user's global account_data. 

Adding is_direct or/and updating the user's account data via a module seems to be hacky, and while it works to an extent, I'm not sure if this isn't a know issue or something that's not considered to be an issue

            request_content.setdefault('is_direct', True)
           # ......
            await self.api.account_data_manager.put_global(inviter, 'm.direct', inviter_direct_rooms)
            await self.api.account_data_manager.put_global(invitee, 'm.direct', invitee_direct_rooms)

It's a minor issue until you disable the "Home" and "Other rooms" meta-spaces. If you do, then newly created rooms will not show up in the sidebar for the inviter and will be invisible to the invitees.

Steps to reproduce

  • Disable "Home" and "Other Rooms" meta spaces
  • Login
  • Create a new DM by clicking on "Add People" + next to the "People" directory of the sidebar

Expected

  • new DM room is created under "People" directory

Actual

  • Room is not present in any directories (People, Rooms) for both Inviter and invitee
  • Invitee is not getting the invite notification (sound, visual)

Homeserver

matrix.org

Synapse Version

1.65

Installation Method

pip (from PyPI)

Platform

Hardware: Macbook Air M1 (16gb)
OS: macOS Big Sur Version 11.0.1
Python Version: 3.7.12

Relevant log output

There is no exception.

Anything else that would be useful to know?

No response

@DMRobertson
Copy link
Contributor

Thanks for the detailed report. I don't have much context on how DMs are modelled by the protocol, but having consulted elsewhere I'm reliably informed that:

  • the behaviour you describe is exactly as intended by the Matrix spec.
  • the expected behaviour would be present if "Canonical DMs" were in use (MSC2199, or one of its related proposals)

Related: matrix-org/matrix-spec#289

I'm going to close this issue because it's a spec-level change that's being discussed elsewhere, and not something for just Synapse-the-server to implement.

@DMRobertson DMRobertson closed this as not planned Won't fix, can't repro, duplicate, stale Sep 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants