bugfix : messageCB must send a string to the plugins and not a JID instance
This commit is contained in:
parent
c5570e33a0
commit
3a91cda882
|
@ -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):
|
||||
|
|
|
@ -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':
|
||||
|
|
Loading…
Reference in New Issue