Skip to content
This repository has been archived by the owner on Oct 24, 2018. It is now read-only.

Handle case where the matrix room alias gets deleted or the room is abandoned #63

Open
turt2live opened this issue May 4, 2018 · 0 comments

Comments

@turt2live
Copy link

Messages can end up going to an empty room (that may no longer be joinable) because synapse doesn't clean up aliases, and likewise telematrix doesn't either.

Steps to reproduce the problem:

  • Set up a bridge to a room
  • Kick everyone and force them to leave, making the room invite only in the process
  • Leave the room yourself
  • Set up the bridge in a new room (and get the "alias already in use" error)
  • As a server admin, delete the room alias from the directory
  • Set up the bridge in your new room (that failed just a couple steps ago)
  • Try sending messages from telegram

What ends up happening is the old link is kept in telematrix, making it so the bridge tries to send to the old room instead of the new room. The new room is recorded in the table though.

There's a few options to handle this:

  • Send events from telegram to all linked matrix rooms (or try to, making sure not to fail on all rooms if one is invite only)
  • If there are duplicates, or doubts that the alias is correctly mapped (ie: room not joinable), then query the homeserver for an updated room ID
  • Always send events to the last linked matrix room instead of the first
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

1 participant