adapt python bindings

This commit is contained in:
B. Petersen
2020-02-14 12:45:03 +01:00
parent 1f9520dc78
commit c8a8dbbbae
3 changed files with 4 additions and 41 deletions

View File

@@ -423,33 +423,7 @@ class Chat(object):
"""return True if this chat is archived.
:returns: True if archived.
"""
return lib.dc_chat_get_archived(self._dc_chat) == const.DC_CHAT_ARCHIVE_STATE_ARCHIVED
def is_pinned(self):
"""return True if this chat is pinned.
:returns: True if pinned.
"""
return lib.dc_chat_get_archived(self._dc_chat) == const.DC_CHAT_ARCHIVE_STATE_PINNED
def archive(self):
"""archive the chat.
"""
lib.dc_archive_chat(self._dc_context, self.id, const.DC_CHAT_ARCHIVE_STATE_ARCHIVED)
def unarchive(self):
"""unarchive the chat.
"""
lib.dc_archive_chat(self._dc_context, self.id, const.DC_CHAT_ARCHIVE_STATE_NORMAL)
def pin(self):
"""pin the chat.
"""
lib.dc_archive_chat(self._dc_context, self.id, const.DC_CHAT_ARCHIVE_STATE_PINNED)
def unpin(self):
"""unpin the chat. (same as unarchive)
"""
self.unarchive()
return lib.dc_chat_get_visibility(self._dc_chat) == const.DC_CHAT_VISIBILITY_ARCHIVED
def enable_sending_locations(self, seconds):
"""enable sending locations for this chat.