Rename method to something more appropriate
This commit is contained in:
parent
6a363678f4
commit
70661b70d3
3 changed files with 4 additions and 4 deletions
|
@ -134,14 +134,14 @@ class AbstractPEPModule:
|
||||||
raise NotImplementedError
|
raise NotImplementedError
|
||||||
|
|
||||||
def _push_event(self, jid, user_pep):
|
def _push_event(self, jid, user_pep):
|
||||||
self._update_contacts(jid, user_pep)
|
self._notification_received(jid, user_pep)
|
||||||
app.nec.push_incoming_event(
|
app.nec.push_incoming_event(
|
||||||
PEPReceivedEvent(None, conn=self._con,
|
PEPReceivedEvent(None, conn=self._con,
|
||||||
jid=str(jid),
|
jid=str(jid),
|
||||||
pep_type=self.name,
|
pep_type=self.name,
|
||||||
user_pep=user_pep))
|
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)):
|
for contact in app.contacts.get_contacts(self._account, str(jid)):
|
||||||
if user_pep:
|
if user_pep:
|
||||||
contact.pep[self.name] = user_pep
|
contact.pep[self.name] = user_pep
|
||||||
|
|
|
@ -123,7 +123,7 @@ class UserAvatar(AbstractPEPModule):
|
||||||
avatar = info.getAttrs()
|
avatar = info.getAttrs()
|
||||||
return avatar or None
|
return avatar or None
|
||||||
|
|
||||||
def _update_contacts(self, jid, user_pep):
|
def _notification_received(self, jid, user_pep):
|
||||||
avatar = user_pep._pep_specific_data
|
avatar = user_pep._pep_specific_data
|
||||||
own_jid = self._con.get_own_jid()
|
own_jid = self._con.get_own_jid()
|
||||||
if avatar is None:
|
if avatar is None:
|
||||||
|
|
|
@ -66,7 +66,7 @@ class UserNickname(AbstractPEPModule):
|
||||||
item.addData(data)
|
item.addData(data)
|
||||||
return item
|
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)):
|
for contact in app.contacts.get_contacts(self._account, str(jid)):
|
||||||
contact.contact_name = user_pep.get_nick()
|
contact.contact_name = user_pep.get_nick()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue