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

Proxy cannot communicate DM room becoming a non-DM #328

Open
DMRobertson opened this issue Oct 4, 2023 · 1 comment
Open

Proxy cannot communicate DM room becoming a non-DM #328

DMRobertson opened this issue Oct 4, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@DMRobertson
Copy link
Contributor

The field is a bool, serialised as omitempty

IsDM bool `json:"is_dm,omitempty"`

which means that a transition true -> false will never be signalled to clients.

In practice nobody changes the DMness of rooms, so this is unlikely to matter.

AFAICS this is where the value that clients will see is set:

IsDM: userRoomData.IsDM,

(indeed there are no other writes to sync3.Room.IsDM).

The corresponding field on UserRoomData is updated when the user cache sees an invite or an "m.direct" room account data event, which seems sensible.

@DMRobertson DMRobertson added the bug Something isn't working label Oct 4, 2023
@DMRobertson
Copy link
Contributor Author

To fix: easy mode is to remove omitempty. Then we'd keep sending down is_dm: false. But we must presumably send down is_dm: true all the time today, so that's fine.

Hard mode is to change sync3.Room.IsDM to be a *bool and only set it to a nonnil value if there is a change in field to report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant