core (constants): added a constant for "encrypted"
This commit is contained in:
parent
ed0312261e
commit
02dc38762e
2 changed files with 10 additions and 5 deletions
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Reference in a new issue