diff --git a/sat/core/constants.py b/sat/core/constants.py index 7ca4d7ba..f98b9d27 100644 --- a/sat/core/constants.py +++ b/sat/core/constants.py @@ -121,9 +121,14 @@ class Const(object): ) MESS_TYPE_ALL = MESS_TYPE_STANDARD + (MESS_TYPE_INFO, MESS_TYPE_AUTO) - MESS_EXTRA_INFO = "info_type" + MESS_EXTRA_INFO = u"info_type" + EXTRA_INFO_DECR_ERR = u"DECRYPTION_ERROR" - MESS_KEY_ENCRYPTION = "ENCRYPTION" + # encryption is a key for plugins + MESS_KEY_ENCRYPTION = u"ENCRYPTION" + # encrypted is a key for frontends + MESS_KEY_ENCRYPTED = u"encrypted" + MESS_KEY_TRUSTED = u"trusted" ## Chat ## CHAT_ONE2ONE = "one2one" diff --git a/sat/memory/encryption.py b/sat/memory/encryption.py index 188ba621..fa34a0a8 100644 --- a/sat/memory/encryption.py +++ b/sat/memory/encryption.py @@ -380,7 +380,7 @@ class EncryptionHandler(object): the plugin @param mess_data(dict): message data as used in post treat workflow """ - mess_data['encrypted'] = True + mess_data[C.MESS_KEY_ENCRYPTED] = True return mess_data def markAsTrusted(self, mess_data): @@ -390,7 +390,7 @@ class EncryptionHandler(object): the plugin @param mess_data(dict): message data as used in post treat workflow """ - mess_data['trusted'] = True + mess_data[C.MESS_KEY_TRUSTED] = True return mess_data def markAsUntrusted(self, mess_data):