add get_setupcodebegin to python bindings, test the function

This commit is contained in:
B. Petersen
2019-09-25 21:13:05 +02:00
parent ea30bb351e
commit 40f9072250
2 changed files with 5 additions and 0 deletions

View File

@@ -101,6 +101,10 @@ class Message(object):
""" return True if this message is a setup message. """
return lib.dc_msg_is_setupmessage(self._dc_msg)
def get_setupcodebegin(self):
""" return the first characters of a setup code in a setup message. """
return from_dc_charpointer(lib.dc_msg_get_setupcodebegin(self._dc_msg))
def is_encrypted(self):
""" return True if this message was encrypted. """
return bool(lib.dc_msg_get_showpadlock(self._dc_msg))