avoid exceptions when messages/contacts/chats are compared with None

This commit is contained in:
adbenitez
2022-06-09 05:00:02 -04:00
parent d286872782
commit 521d14a6e0
4 changed files with 9 additions and 3 deletions

View File

@@ -22,7 +22,9 @@ class Contact(object):
self.account = account
self.id = id
def __eq__(self, other):
def __eq__(self, other) -> bool:
if other is None:
return False
return self.account._dc_context == other.account._dc_context and self.id == other.id
def __ne__(self, other):