encryption: Add encrypt_enabled decorator to some functions.
This commit is contained in:
parent
36cd12225b
commit
d28e6eb598
1 changed files with 3 additions and 0 deletions
|
@ -150,6 +150,7 @@ class MatrixServer:
|
||||||
prefix=W.prefix("error"), error=error)
|
prefix=W.prefix("error"), error=error)
|
||||||
W.prnt("", message)
|
W.prnt("", message)
|
||||||
|
|
||||||
|
@encrypt_enabled
|
||||||
def create_olm(self):
|
def create_olm(self):
|
||||||
message = ("{prefix}matrix: Creating new Olm identity for "
|
message = ("{prefix}matrix: Creating new Olm identity for "
|
||||||
"{self_color}{user}{ncolor}"
|
"{self_color}{user}{ncolor}"
|
||||||
|
@ -165,6 +166,7 @@ class MatrixServer:
|
||||||
W.prnt(self.server_buffer, message)
|
W.prnt(self.server_buffer, message)
|
||||||
self.olm = Olm()
|
self.olm = Olm()
|
||||||
|
|
||||||
|
@encrypt_enabled
|
||||||
def store_olm(self):
|
def store_olm(self):
|
||||||
self.olm.to_session_dir(self)
|
self.olm.to_session_dir(self)
|
||||||
|
|
||||||
|
@ -461,6 +463,7 @@ class MatrixServer:
|
||||||
message = MatrixSyncMessage(self.client, self.next_batch, limit)
|
message = MatrixSyncMessage(self.client, self.next_batch, limit)
|
||||||
self.send_queue.append(message)
|
self.send_queue.append(message)
|
||||||
|
|
||||||
|
@encrypt_enabled
|
||||||
def upload_keys(self, device_keys=False, one_time_keys=False):
|
def upload_keys(self, device_keys=False, one_time_keys=False):
|
||||||
keys = self.olm.account.identity_keys() if device_keys else None
|
keys = self.olm.account.identity_keys() if device_keys else None
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue