Rename same attr. Fix #3

This commit is contained in:
Denis Fomin
2010-10-19 10:29:07 +04:00
parent 387916f666
commit 62ac20bcdf
2 changed files with 4 additions and 4 deletions

View File

@@ -27,14 +27,14 @@ class ChatstatePlugin(GajimPlugin):
def raw_pres_received(self, event_object):
if not self.active:
return
jid = str(event_object.xmpp_msg.getFrom())
jid = str(event_object.stanza.getFrom())
account = event_object.account
contact = gajim.contacts.get_contact_from_full_jid(account, jid)
if not contact:
return
for chatstate in self.chatstates:
state = event_object.xmpp_msg.getTag(chatstate)
state = event_object.stanza.getTag(chatstate)
if state:
break
if not state:

View File

@@ -197,7 +197,7 @@ class ClientsIconsPlugin(GajimPlugin):
self.set_icon(roster.model, iter_, self.renderer_num, caps)
return
caps = None
tag = iq_obj.iq_obj.getTags('c')
tag = iq_obj.stanza.getTags('c')
if tag:
caps = tag[0].getAttr('node')
self.set_icon(roster.model, iter_, self.renderer_num, caps)
@@ -210,7 +210,7 @@ class ClientsIconsPlugin(GajimPlugin):
if not contact:
return
caps = None
tag = iq_obj.iq_obj.getTags('c')
tag = iq_obj.stanza.getTags('c')
if tag:
caps = tag[0].getAttr('node')
iter_ = iq_obj.gc_control.get_contact_iter(iq_obj.nick.decode('utf-8'))