commands: Don't show deleted devices in the olm command.

This commit is contained in:
Damir Jelić 2018-10-13 12:13:10 +02:00
parent 08ad527a1f
commit d8362c572b
2 changed files with 15 additions and 2 deletions

View file

@ -188,6 +188,17 @@ def matrix_olm_device_completion_cb(data, completion_item, buffer, completion):
user = fields[1]
if user not in olm.device_store.users:
return W.WEECHAT_RC_OK
for device in olm.device_store.active_user_devices(user):
W.hook_completion_list_add(
completion, device.id, 0, W.WEECHAT_LIST_POS_SORT
)
return W.WEECHAT_RC_OK
if user not in olm.device_store.users:
return W.WEECHAT_RC_OK