python: add error property to messages

This commit is contained in:
Alexander Krotov
2021-01-10 02:21:01 +03:00
committed by link2xt
parent 0e1ca4323c
commit bb9e6038c4
2 changed files with 9 additions and 0 deletions

View File

@@ -212,6 +212,11 @@ class Message(object):
return email.message_from_bytes(s)
return email.message_from_string(s)
@property
def error(self):
"""Error message"""
return from_dc_charpointer(lib.dc_msg_get_error(self._dc_msg))
@property
def chat(self):
"""chat this message was posted in.