represent archivestate as enum

before it was a boolean, even though it is a 3 state
This commit is contained in:
Simon Laux
2020-02-08 20:47:20 +01:00
committed by B. Petersen
parent 7274197da0
commit 5678562ce2
7 changed files with 161 additions and 67 deletions

View File

@@ -423,7 +423,13 @@ class Chat(object):
"""return True if this chat is archived.
:returns: True if archived.
"""
return lib.dc_chat_get_archived(self._dc_chat)
return lib.dc_chat_get_archived(self._dc_chat) == 1
def is_pinned(self):
"""return True if this chat is pinned.
:returns: True if pinned.
"""
return lib.dc_chat_get_archived(self._dc_chat) == 2
def enable_sending_locations(self, seconds):
"""enable sending locations for this chat.