# HG changeset patch # User Goffi # Date 1546623962 -3600 # Node ID 1fa615faec8bd1d710cd564835e7f31ecb559db8 # Parent 286a32a187e7abbd78f90eeb58c465ce8b8ef9e0 core (constants): added a constant for "encrypted" diff -r 286a32a187e7 -r 1fa615faec8b sat/core/constants.py --- a/sat/core/constants.py Fri Jan 04 18:44:43 2019 +0100 +++ b/sat/core/constants.py Fri Jan 04 18:46:02 2019 +0100 @@ -121,9 +121,14 @@ ) 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 -r 286a32a187e7 -r 1fa615faec8b sat/memory/encryption.py --- a/sat/memory/encryption.py Fri Jan 04 18:44:43 2019 +0100 +++ b/sat/memory/encryption.py Fri Jan 04 18:46:02 2019 +0100 @@ -380,7 +380,7 @@ 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 @@ 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):