From 2cfa3ce2881e10756aae50d36b67cf7724aae878 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Tue, 25 Apr 2017 15:19:47 +0200 Subject: [PATCH] limited offline support for pgp group chats use pgp key from contact if not set in muc fixes #283 --- .../java/eu/siacs/conversations/entities/MucOptions.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/eu/siacs/conversations/entities/MucOptions.java b/src/main/java/eu/siacs/conversations/entities/MucOptions.java index 852959736..6272b469b 100644 --- a/src/main/java/eu/siacs/conversations/entities/MucOptions.java +++ b/src/main/java/eu/siacs/conversations/entities/MucOptions.java @@ -242,7 +242,13 @@ public class MucOptions { } public long getPgpKeyId() { - return this.pgpKeyId; + if (this.pgpKeyId != 0) { + return this.pgpKeyId; + } else if (realJid != null) { + return getAccount().getRoster().getContact(realJid).getPgpKeyId(); + } else { + return 0; + } } public Contact getContact() {