From f935d976de3995d3c50d0995076028c06263c9b2 Mon Sep 17 00:00:00 2001 From: Anup Dhamala Date: Thu, 1 Oct 2015 17:41:09 -0400 Subject: [PATCH] Check for id in stanza before using it --- src/xmpp.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xmpp.coffee b/src/xmpp.coffee index 498ba39..599eb88 100644 --- a/src/xmpp.coffee +++ b/src/xmpp.coffee @@ -218,7 +218,7 @@ class XmppBot extends Adapter @robot.logger.debug "[sending pong] #{pong}" @client.send pong - else if ((stanza.attrs.id.startsWith 'get_users_in_room') && stanza.children[0].children) + else if ((stanza.attrs.id?.startsWith 'get_users_in_room') && stanza.children[0].children) roomJID = stanza.attrs.from userItems = stanza.children[0].children