conversejs / converse.js

Web-based XMPP/Jabber chat client written in JavaScript
http://conversejs.org
Mozilla Public License 2.0
3.08k stars 771 forks source link

MUC - invites appear to come from MUC name part #1836

Open licaon-kter opened 4 years ago

licaon-kter commented 4 years ago

...instead of user.

HEAD (d17ae811d758e35f24770bd46ad88ee976f5c6b3), Firefox 72

Steps:

Expected:

Actual result:

--- Want to back this issue? **[Post a bounty on it!](https://app.bountysource.com/issues/87077012-muc-invites-appear-to-come-from-muc-name-part?utm_campaign=plugin&utm_content=tracker%2F194169&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://app.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F194169&utm_medium=issues&utm_source=github).
licaon-kter commented 4 years ago

Umm now I see myhamlet@conference.somedomain.tld invited you to myhamlet@conference.somedomain.tld which still does not sound right as I expect (better said find more useful) to be invited by a user not by the MUC itself (specially when MUC ids are randomly generated)

iNPUTmice says: "you might have reported that against mediated invites, but that fix is for direct invites"

iNPUTmice commented 4 years ago

The "problem" is that ejabberd sends a mediated and a direct invite in the same message stanza. As far as I can tell Converse.js doesn’t support mediated invites and only parses the direct invite. Direct invites usually come from the the inviter. Therefor Converse.js correctly parses the from of the message stanza - which in this case is the room itself.

jcbrand commented 4 years ago

You're right @iNPUTmice. @licaon-kter can you post an example stanza from ejabberd so that I can write a test for it?

iNPUTmice commented 4 years ago
<message xmlns="jabber:client" from="conversations@conference.siacs.eu" to="christ19@jabber.de">
  <x xmlns="http://jabber.org/protocol/muc#user">
    <invite xmlns="http://jabber.org/protocol/muc#user" from="daniel@example.com/Conversations.QS-P"/>
  </x>
  <x jid="conversations@conference.siacs.eu" xmlns="jabber:x:conference"/>
  <body xml:lang="en" xmlns="jabber:client">daniel@example.com/Conversations.QS-P invites you to the room conversations@conference.siacs.eu</body>
</message>
licaon-kter commented 4 years ago

@jcbrand no, not really :))

Do I see this in the debug console?

/LE: beaten by the boss :)