From 3e111e7f58f9a3f38a73a9027f707b449fbf81ee Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Sat, 27 Jan 2018 09:15:47 +0100 Subject: [PATCH] allow axolotl header to be empty in empty mucs --- .../siacs/conversations/crypto/axolotl/AxolotlService.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/crypto/axolotl/AxolotlService.java b/src/main/java/eu/siacs/conversations/crypto/axolotl/AxolotlService.java index a202a4c66..6f88e80d9 100644 --- a/src/main/java/eu/siacs/conversations/crypto/axolotl/AxolotlService.java +++ b/src/main/java/eu/siacs/conversations/crypto/axolotl/AxolotlService.java @@ -1212,10 +1212,11 @@ public class AxolotlService implements OnAdvancedStreamFeaturesLoaded { } @Nullable - private boolean buildHeader(XmppAxolotlMessage axolotlMessage, Conversation conversation) { - Set remoteSessions = findSessionsForConversation(conversation); + private boolean buildHeader(XmppAxolotlMessage axolotlMessage, Conversation c) { + Set remoteSessions = findSessionsForConversation(c); + final boolean acceptEmpty = c.getMode() == Conversation.MODE_MULTI && c.getMucOptions().getUserCount() == 0; Collection ownSessions = findOwnSessions(); - if (remoteSessions.isEmpty()) { + if (remoteSessions.isEmpty() && !acceptEmpty) { return false; } for (XmppAxolotlSession session : remoteSessions) {