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

Federation: history is broken when an invited member joins a room that he left previously #3515

Open
giomfo opened this issue Jul 11, 2018 · 4 comments
Labels
A-Federation T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues. z-bug (Deprecated Label)

Comments

@giomfo
Copy link
Member

giomfo commented Jul 11, 2018

TL;DR: history may be missing between a federated user being re-invited to a room and re-joining it.

Description

A part of the room history is missing when an invited member joins a room that he left previously,
if the room has been created on another homeserver than the member's one.
Note: The e2e encryption is disabled in this room.

Steps to reproduce

  • Consider 2 users userA and userB, created on 2 different Homeservers.
  • userA creates a room, history_visibility is shared (default value)
  • userA invites userB
  • userA sends some messages
  • userB joins, he can read the messages OK
  • userA and userB send some messages OK
  • userB leaves the room
  • userA sends a message M1
  • userA invites again userB
  • userA sends a message M2
  • userB joins, the messages M1 and M2 are missing in the room history (I checked we did not get them in the server sync response after userB joined the room) NOK

Note1: The room history is restored correctly if we trigger an initial sync. Indeed the messages M1 and M2 are then provided in the server sync response.

Note2: You can send more than 1 message with the message M2. The problem is the same, userB don't receive them when he joins. He gets them only by triggering an initial sync.

Note3: This issue is not reproduced when userA and userB belong to the same homeserver.

@giomfo giomfo added z-bug (Deprecated Label) A-Federation labels Jul 11, 2018
@ara4n
Copy link
Member

ara4n commented Jul 12, 2018

@giomfo does M2 ever arrive? I'm wondering if userB has to speak in the room to 'pull in' the missing message.

@giomfo
Copy link
Member Author

giomfo commented Jul 12, 2018

@ara4n yes M2 arrived
no, the missing message is not pulled in If userB speaks in the room

@ara4n
Copy link
Member

ara4n commented Jul 12, 2018

ok, what happened to cause M2 to arrive?

@giomfo
Copy link
Member Author

giomfo commented Jul 13, 2018

what happened to cause M2 to arrive?

I triggered a clear cache on the userB client, which involves an initial sync.

To sum up:

  • The room history (10 last events of the timeline) is wrong in the server sync response after userB joined again the room.
  • This history (10 last events of the timeline) is correct when I force an initial sync for this room

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Federation T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues. z-bug (Deprecated Label)
Projects
None yet
Development

No branches or pull requests

3 participants