From f1be90c02f26c942e67978fd6d10ff2feeec8f9e Mon Sep 17 00:00:00 2001 From: fiaxh Date: Sun, 26 May 2024 17:28:28 +0200 Subject: Add logic for OMEMO by default setting --- plugins/omemo/src/ui/encryption_list_entry.vala | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'plugins/omemo/src/ui') diff --git a/plugins/omemo/src/ui/encryption_list_entry.vala b/plugins/omemo/src/ui/encryption_list_entry.vala index b262ef81..3bb76c52 100644 --- a/plugins/omemo/src/ui/encryption_list_entry.vala +++ b/plugins/omemo/src/ui/encryption_list_entry.vala @@ -53,7 +53,12 @@ public class EncryptionListEntry : Plugins.EncryptionListEntry, Object { Manager omemo_manager = plugin.app.stream_interactor.get_module(Manager.IDENTITY); if (muc_manager.is_private_room(conversation.account, conversation.counterpart)) { - foreach (Jid offline_member in muc_manager.get_offline_members(conversation.counterpart, conversation.account)) { + var offline_members = muc_manager.get_offline_members(conversation.counterpart, conversation.account); + if (offline_members == null) { + // We don't store offline members yet, and it'll be null if we're offline + return; + } + foreach (Jid offline_member in offline_members) { bool ok = yield omemo_manager.ensure_get_keys_for_jid(conversation.account, offline_member); if (!ok) { input_status_callback(new Plugins.InputFieldStatus("A member does not support OMEMO: %s".printf(offline_member.to_string()), Plugins.InputFieldStatus.MessageType.ERROR, Plugins.InputFieldStatus.InputState.NO_SEND)); -- cgit v1.2.3-70-g09d2