aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2024-05-26 17:28:28 +0200
committerfiaxh <git@lightrise.org>2024-05-26 17:28:28 +0200
commitf1be90c02f26c942e67978fd6d10ff2feeec8f9e (patch)
tree2c3ad321b92350ecb69d2ee33e187bc410ab2c9d /plugins
parentfe45ab575c687febc1f342b0882a7597bd6ae9dc (diff)
downloaddino-f1be90c02f26c942e67978fd6d10ff2feeec8f9e.tar.gz
dino-f1be90c02f26c942e67978fd6d10ff2feeec8f9e.zip
Add logic for OMEMO by default setting
Diffstat (limited to 'plugins')
-rw-r--r--plugins/omemo/src/ui/encryption_list_entry.vala7
1 files changed, 6 insertions, 1 deletions
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));