aboutsummaryrefslogtreecommitdiff
path: root/plugins/omemo
diff options
context:
space:
mode:
authorSamuel Hand <samuel.hand@openmailbox.org>2018-08-08 14:45:09 +0100
committerSamuel Hand <samuel.hand@openmailbox.org>2018-08-08 14:45:09 +0100
commitcdaa29d7f08fcee1099c53184ba8b36bb93a1bc1 (patch)
tree11257d92862e1b861d27caad7c9102b9efa5ff80 /plugins/omemo
parent14fc267e83595a499ad1f2ca27c9192b0c9ec430 (diff)
downloaddino-cdaa29d7f08fcee1099c53184ba8b36bb93a1bc1.tar.gz
dino-cdaa29d7f08fcee1099c53184ba8b36bb93a1bc1.zip
Only send messages to active devices
Diffstat (limited to 'plugins/omemo')
-rw-r--r--plugins/omemo/src/trust_manager.vala2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/omemo/src/trust_manager.vala b/plugins/omemo/src/trust_manager.vala
index ca505c3f..d25f7b00 100644
--- a/plugins/omemo/src/trust_manager.vala
+++ b/plugins/omemo/src/trust_manager.vala
@@ -122,7 +122,7 @@ public class TrustManager {
public Gee.List<int32> get_trusted_devices(Account account, Jid jid) {
Gee.List<int32> devices = new ArrayList<int32>();
- foreach (Row device in db.identity_meta.with_address(account.id, jid.to_string()).with(db.identity_meta.trust_level, "!=", Database.IdentityMetaTable.TrustLevel.UNTRUSTED)) {
+ foreach (Row device in db.identity_meta.with_address(account.id, jid.to_string()).with(db.identity_meta.trust_level, "!=", Database.IdentityMetaTable.TrustLevel.UNTRUSTED).with(db.identity_meta.now_active, "=", true)) {
if(device[db.identity_meta.trust_level] != Database.IdentityMetaTable.TrustLevel.UNKNOWN || device[db.identity_meta.identity_key_public_base64] == null)
devices.add(device[db.identity_meta.device_id]);
}