diff --git a/index.js b/index.js
index b130c8d..37c38cd 100644
--- a/index.js
+++ b/index.js
@@ -80,7 +80,7 @@ function createHttpListener() {
 }
 
 function sendMessage(destination, message) {
-    if (destination != config.globals.jid) {
+    if (destination != config.globals.jid.replace(/\/.*/, '')) {
         logger.info('Sending xmpp message', {from: config.globals.jid, to: destination, message: message});
     }
 
@@ -124,7 +124,7 @@ xmpp.on('online', function(data) {
 });
 
 xmpp.on('chat', function(from, message) {
-    if (from == config.globals.jid) {
+    if (from == config.globals.jid.replace(/\/.*/, '')) {
         return;
     }