olm: Mark one time keys as published and store the account.
This commit is contained in:
parent
d28e6eb598
commit
f8c1f564ae
3 changed files with 11 additions and 0 deletions
4
main.py
4
main.py
|
@ -432,6 +432,10 @@ def room_close_cb(data, buffer):
|
|||
@utf8_decode
|
||||
def matrix_unload_cb():
|
||||
matrix_config_free(matrix.globals.CONFIG)
|
||||
|
||||
for server in SERVERS.values():
|
||||
server.store_olm()
|
||||
|
||||
W.prnt("", "unloading")
|
||||
return W.WEECHAT_RC_OK
|
||||
|
||||
|
|
|
@ -199,3 +199,7 @@ class Olm():
|
|||
))
|
||||
|
||||
return signature
|
||||
|
||||
@encrypt_enabled
|
||||
def mark_keys_as_published(self):
|
||||
self.account.mark_keys_as_published()
|
||||
|
|
|
@ -74,6 +74,9 @@ class MatrixKeyUploadEvent(MatrixEvent):
|
|||
MatrixEvent.__init__(self, server)
|
||||
|
||||
def execute(self):
|
||||
self.server.olm.mark_keys_as_published()
|
||||
self.server.store_olm()
|
||||
|
||||
if not self.device_keys:
|
||||
return
|
||||
|
||||
|
|
Loading…
Reference in a new issue