simple-xmpp / node-simple-xmpp

Simple High Level NodeJS XMPP Client
302 stars 90 forks source link

The "chat" event should return the complete "stanza.attrs.from" #92

Closed le-yak closed 3 years ago

le-yak commented 3 years ago

After gaining some insight on XMPP, I am reiterating an old, broken pull request (#86)

The "from" parameter returned from the chat event drops the "resource" part of the JID. This contradicts the README, and the inconsistency with the groupchat event is unexpected (although somewhat understandable). This was changed during bac143351a75c98ee7fb888bbbb2da3d3adadaa2, probably overlooking cases when the chat is a private message from a MUC (then the first part before the / is just the room's JID).

Fixes #82.

silverbucket commented 3 years ago

Thanks @le-yak - this looks good to me.