mirror of
https://github.com/chatmail/core.git
synced 2026-05-07 08:56:30 +03:00
Add {get,set}_autodelete_timer to python API
This commit is contained in:
@@ -138,6 +138,22 @@ class Chat(object):
|
|||||||
"""
|
"""
|
||||||
return bool(lib.dc_chat_get_remaining_mute_duration(self.id))
|
return bool(lib.dc_chat_get_remaining_mute_duration(self.id))
|
||||||
|
|
||||||
|
def get_autodelete_timer(self):
|
||||||
|
""" get autodelete timer.
|
||||||
|
|
||||||
|
:returns: autodelete timer value in seconds
|
||||||
|
"""
|
||||||
|
return lib.dc_get_chat_autodelete_timer(self._dc_context, self.id)
|
||||||
|
|
||||||
|
def set_autodelete_timer(self, timer):
|
||||||
|
""" set autodelete timer.
|
||||||
|
|
||||||
|
:param: timer value in seconds
|
||||||
|
|
||||||
|
:returns: None
|
||||||
|
"""
|
||||||
|
return lib.dc_set_chat_autodelete_timer(self._dc_context, self.id, timer)
|
||||||
|
|
||||||
def get_type(self):
|
def get_type(self):
|
||||||
""" (deprecated) return type of this chat.
|
""" (deprecated) return type of this chat.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user