matrix-org / matrix-org/matrix-bifrost

Properly handle kick from a MUC

Open
#51 3 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

T-Enhancement
Dominant language
TypeScript
Stars
187
Forks
38
PR merge metrics
No merged PRs in 30d

Description

When you kick a Matrix Simulacrum from a MUC, it's not reflected on the Matrix side appropriately. Messages written in the MUC after the kick never get delivered to the user.

When the user sends a message, it is dropped, but the user joins into the MUC. Not sure if this was a race condition between XEP-0410 and the message sending, or if your code triggers a XEP-0410 self-ping when sending a message.

<!-- user is kicked from the MUC -->
Feb 15 16:05:03 Sending[s2sout]: <presence type='unavailable' to='somebody_matrix.org@bridge.xmpp.matrix.org/matrix-bridge' from='xmpp@chat.yax.im/somebody'>

<!-- things happen, user writes a message, bifrost tests self-presence according to XEP-0410? -->
Feb 15 16:05:58 Received[s2sin]: <iq id='a2daf467-275f-4ae2-a461-03915f22cf1c' type='get' to='xmpp@chat.yax.im/somebody' from='somebody_matrix.org@bridge.xmpp.matrix.org/matrix-bridge'>
Feb 15 16:05:58 Sending[s2sout]: <iq id='a2daf467-275f-4ae2-a461-03915f22cf1c' type='error' to='somebody_matrix.org@bridge.xmpp.matrix.org/matrix-bridge' from='xmpp@chat.yax.im/somebody'>
Feb 15 16:05:58 Received[s2sin]: <message id='$15502431573634DqrJo:matrix.org' type='groupchat' to='xmpp@chat.yax.im' from='somebody_matrix.org@bridge.xmpp.matrix.org/matrix-bridge'>
Feb 15 16:05:58 Sending[s2sout]: <message id='$15502431573634DqrJo:matrix.org' type='error' to='somebody_matrix.org@bridge.xmpp.matrix.org/matrix-bridge' from='xmpp@chat.yax.im'>
Feb 15 16:05:58 Received[s2sin]: <presence to='xmpp@chat.yax.im/somebody' from='somebody_matrix.org@bridge.xmpp.matrix.org/matrix-bridge'>
Feb 15 16:05:58 mod_muc debug   somebody_matrix.org@bridge.xmpp.matrix.org/matrix-bridge joining as xmpp@chat.yax.im/somebody

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the MUC kick handling and the XEP-0410 self-presence sequence described in the issue logs. Reproduce the kick, message, IQ error, and subsequent presence flow; done means the kicked user does not rejoin unexpectedly and messages sent afterward are handled correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.