matrix-org/matrix-bifrost

Silent failure delivering to a JabberID with no `@`

singpolyma opened this issue · 3 comments

Describe the bug

Trying to talk to a JabberID with no @ in it fails.

To Reproduce
Steps to reproduce the behavior:

  1. Open conversation with @_xmpp_cheogram.com:matrix.org
  2. Send message "help"
  3. See no error and no response from the bot

Expected behavior

The message should be delivered and I should be able to see the response.

I think if

this.from = from;
just stripped any leading @ this would fix it, since the code everywhere produces mxid like local@domain and when I send from a domain JID via bifrost it is received as @domain so the reply would come from @domain which is probably being rejected at the XMPP side as an invalid JID. So just stripping that leading @ would fix it if that's all it is.

(it would still be a bit unintuitive that you have to put the leading @ on the matrix side, but easy to document)

sorry, the above I should have said we need to change the line for to, not from, obviously.

To follow this ticket.