Rename method to something more appropriate

This commit is contained in:
Philipp Hörist 2018-07-06 20:12:50 +02:00
parent 6a363678f4
commit 70661b70d3
3 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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:

View File

@ -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()