aboutsummaryrefslogtreecommitdiff
path: root/plugins/omemo/src/contact_details_provider.vala
diff options
context:
space:
mode:
authorSamuel Hand <samuel.hand@openmailbox.org>2018-08-12 11:04:40 +0100
committerSamuel Hand <samuel.hand@openmailbox.org>2018-08-12 11:04:40 +0100
commite2932af18f31d8457c3d72ba9d3b80d912934c7f (patch)
treed0ce9dd2bd0e73fb090da8674431938e7c91fb7a /plugins/omemo/src/contact_details_provider.vala
parentb589275ab46d42584bfc99edfa2054e9c8841ccc (diff)
downloaddino-e2932af18f31d8457c3d72ba9d3b80d912934c7f.tar.gz
dino-e2932af18f31d8457c3d72ba9d3b80d912934c7f.zip
Index consistently with the identity id
Diffstat (limited to 'plugins/omemo/src/contact_details_provider.vala')
-rw-r--r--plugins/omemo/src/contact_details_provider.vala5
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/omemo/src/contact_details_provider.vala b/plugins/omemo/src/contact_details_provider.vala
index 4b919009..7250d135 100644
--- a/plugins/omemo/src/contact_details_provider.vala
+++ b/plugins/omemo/src/contact_details_provider.vala
@@ -17,8 +17,11 @@ public class ContactDetailsProvider : Plugins.ContactDetailsProvider, Object {
public void populate(Conversation conversation, Plugins.ContactDetails contact_details, WidgetType type) {
if (conversation.type_ == Conversation.Type.CHAT && type == WidgetType.GTK) {
+ int identity_id = plugin.db.identity.get_id(conversation.account.id);
+ if (identity_id < 0) return;
+
int i = 0;
- foreach (Row row in plugin.db.identity_meta.with_address(conversation.account.id, conversation.counterpart.to_string())) {
+ foreach (Row row in plugin.db.identity_meta.with_address(identity_id, conversation.counterpart.to_string())) {
if (row[plugin.db.identity_meta.identity_key_public_base64] != null) {
i++;
}