Skip to content

Commit

Permalink
fix: skip handling of message stanzas with type 'error'
Browse files Browse the repository at this point in the history
  • Loading branch information
trampi committed Feb 4, 2019
1 parent a42fd9d commit b4418d3
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ export class MessagePlugin extends AbstractXmppPlugin {
}

private isMessageStanza(stanza: Stanza): stanza is MessageWithBodyStanza {
return stanza.name === 'message' && stanza.attrs.type !== 'groupchat' && !!stanza.getChildText('body');
return stanza.name === 'message'
&& stanza.attrs.type !== 'groupchat'
&& stanza.attrs.type !== 'error'
&& !!stanza.getChildText('body');
}

private handleMessageStanza(messageStanza: MessageWithBodyStanza) {
Expand Down

0 comments on commit b4418d3

Please sign in to comment.