Skip to content

Create new Matrix DM room when Gitter user can't join the old one

Create new Matrix DM room when Gitter user can't join the old one. This fixes the scenario where a Gitter user leaves the the DM room on Gitter, which syncs to Matrix but is unable to re-join when they want to chat again (see bug reproduction).

Fix #2783 (closed)

Testing strategy

Join back from Gitter

  1. Start a DM conversation between a Matrix and Gitter user
  2. Leave the DM on the Gitter side
  3. From Gitter, open the DM room again and send a message
  4. Notice a new DM is created on the Matrix side and the message is sent

New DM room from Matrix

  1. Start a DM conversation between a Matrix and Gitter user
  2. Leave the DM on the Matrix side
  3. Start a new Matrix DM with the same Gitter user
  4. Send a message from Matrix
  5. Notice how the messages go to the same Gitter room so you can still communicate

New message when the other party (Gitter) is not in the room

  1. Start a DM conversation between a Matrix and Gitter user
  2. Leave the DM on the Gitter side
  3. From Matrix, start a new DM and send a message
  4. Notice the message is bridged

New message when the other party (Matrix) is not in the room

  1. Start a DM conversation between a Matrix and Gitter user
  2. Leave the DM on the Matrix side
  3. From Gitter, send a message in the DM room
  4. Notice the Matrix user is invited back to the room and the message is bridged

Todo

  • Since we sync leave events now, it doesn't make sense to keep around the warning feedback code since we don't have a user in the room to send the message in the private DM room. modules/matrix-bridge/lib/matrix-event-handler.js#L299-321
  • Add tests
  • Testing strategy
    • Join back from Gitter
    • New DM room from Matrix
    • New message when the other party (Gitter) is not in the room
    • New message when the other party (Matrix) is not in the room
Edited by Eric Eastwood

Merge request reports