Commit d45f03c517d0f644fcb00a9923a186903bc86690
1 parent
7458497759
Exists in
master
trim jid
Showing 1 changed file with 2 additions and 2 deletions Side-by-side Diff
index.js
... | ... | @@ -80,7 +80,7 @@ function createHttpListener() { |
80 | 80 | } |
81 | 81 | |
82 | 82 | function sendMessage(destination, message) { |
83 | - if (destination != config.globals.jid) { | |
83 | + if (destination != config.globals.jid.replace(/\/.*/, '')) { | |
84 | 84 | logger.info('Sending xmpp message', {from: config.globals.jid, to: destination, message: message}); |
85 | 85 | } |
86 | 86 | |
... | ... | @@ -124,7 +124,7 @@ xmpp.on('online', function(data) { |
124 | 124 | }); |
125 | 125 | |
126 | 126 | xmpp.on('chat', function(from, message) { |
127 | - if (from == config.globals.jid) { | |
127 | + if (from == config.globals.jid.replace(/\/.*/, '')) { | |
128 | 128 | return; |
129 | 129 | } |
130 | 130 |