core (memory/encryption): "isEncryptionRequested" helper method:
this method is similar to "isEncrypted" but for outgoing messages.
This commit is contained in:
parent
a194874638
commit
619b6e9b4b
1 changed files with 9 additions and 1 deletions
|
|
@ -437,8 +437,16 @@ class EncryptionHandler(object):
|
|||
mess_data[C.MESS_KEY_ENCRYPTED] = True
|
||||
return mess_data
|
||||
|
||||
def isEncryptionRequested(self, mess_data):
|
||||
"""Helper method to check if encryption is requested in an outgoind message
|
||||
|
||||
@param mess_data(dict): message data for outgoing message
|
||||
@return (bool): True if the encryption flag is present
|
||||
"""
|
||||
return bool(mess_data.get(C.MESS_KEY_ENCRYPTION, False))
|
||||
|
||||
def isEncrypted(self, mess_data):
|
||||
"""Helper method to check if a message has the e2e encrypted flag
|
||||
"""Helper method to check if an incoming message has the e2e encrypted flag
|
||||
|
||||
@param mess_data(dict): message data
|
||||
@return (bool): True if the encrypted flag is present
|
||||
|
|
|
|||
Loading…
Reference in a new issue