Rename method to something more appropriate
This commit is contained in:
parent
6a363678f4
commit
70661b70d3
gajim/common/modules
|
@ -134,14 +134,14 @@ class AbstractPEPModule:
|
|||
raise NotImplementedError
|
||||
|
||||
def _push_event(self, jid, user_pep):
|
||||
self._update_contacts(jid, user_pep)
|
||||
self._notification_received(jid, user_pep)
|
||||
app.nec.push_incoming_event(
|
||||
PEPReceivedEvent(None, conn=self._con,
|
||||
jid=str(jid),
|
||||
pep_type=self.name,
|
||||
user_pep=user_pep))
|
||||
|
||||
def _update_contacts(self, jid, user_pep):
|
||||
def _notification_received(self, jid, user_pep):
|
||||
for contact in app.contacts.get_contacts(self._account, str(jid)):
|
||||
if user_pep:
|
||||
contact.pep[self.name] = user_pep
|
||||
|
|
|
@ -123,7 +123,7 @@ class UserAvatar(AbstractPEPModule):
|
|||
avatar = info.getAttrs()
|
||||
return avatar or None
|
||||
|
||||
def _update_contacts(self, jid, user_pep):
|
||||
def _notification_received(self, jid, user_pep):
|
||||
avatar = user_pep._pep_specific_data
|
||||
own_jid = self._con.get_own_jid()
|
||||
if avatar is None:
|
||||
|
|
|
@ -66,7 +66,7 @@ class UserNickname(AbstractPEPModule):
|
|||
item.addData(data)
|
||||
return item
|
||||
|
||||
def _update_contacts(self, jid, user_pep):
|
||||
def _notification_received(self, jid, user_pep):
|
||||
for contact in app.contacts.get_contacts(self._account, str(jid)):
|
||||
contact.contact_name = user_pep.get_nick()
|
||||
|
||||
|
|
Loading…
Reference in New Issue