peers - more callback and peers list refactoring
This commit is contained in:
parent
b8fa8df41a
commit
c6b67452ed
6 changed files with 53 additions and 27 deletions
|
|
@ -41,6 +41,10 @@ class GroupChat(contact.Contact, ToxSave):
|
|||
is_current_user)
|
||||
self._peers.append(peer)
|
||||
|
||||
def remove_peer(self, peer_id):
|
||||
peer = self.get_peer_by_id(peer_id)
|
||||
self._peers.remove(peer)
|
||||
|
||||
def get_peer_by_id(self, peer_id):
|
||||
peers = list(filter(lambda p: p.id == peer_id, self._peers))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue