diff --git a/core/core.py b/core/core.py index dcc887bd4..aab7b17bc 100644 --- a/core/core.py +++ b/core/core.py @@ -119,7 +119,7 @@ class GajimCore: def messageCB(self, con, msg): """Called when we recieve a message""" self.hub.sendPlugin('MSG', self.connexions[con], \ - (msg.getFrom(), msg.getBody())) + (str(msg.getFrom()), msg.getBody())) # END messageCB def presenceCB(self, con, prs): diff --git a/plugins/gtkgui/gtkgui.py b/plugins/gtkgui/gtkgui.py index b459aafde..68e273bd3 100644 --- a/plugins/gtkgui/gtkgui.py +++ b/plugins/gtkgui/gtkgui.py @@ -1254,10 +1254,9 @@ class plugin: self.roster.chg_user_status(user1, ev[2][1], ev[2][2], ev[1]) #('MSG', account, (user, msg)) elif ev[0] == 'MSG': - if string.find(ev[2][0], "@") <= 0: - jid = string.replace(ev[2][0], '@', '') - else: - jid = ev[2][0] + jid = string.split(ev[2][0], '/')[0] + if string.find(jid, "@") <= 0: + jid = string.replace(jid, '@', '') self.roster.on_message(jid, ev[2][1], ev[1]) #('SUBSCRIBE', account, (jid, text)) elif ev[0] == 'SUBSCRIBE':