allow axolotl header to be empty in empty mucs

This commit is contained in:
Daniel Gultsch 2018-01-27 09:15:47 +01:00
parent a5256c3e83
commit 3e111e7f58
1 changed files with 4 additions and 3 deletions

View File

@ -1212,10 +1212,11 @@ public class AxolotlService implements OnAdvancedStreamFeaturesLoaded {
}
@Nullable
private boolean buildHeader(XmppAxolotlMessage axolotlMessage, Conversation conversation) {
Set<XmppAxolotlSession> remoteSessions = findSessionsForConversation(conversation);
private boolean buildHeader(XmppAxolotlMessage axolotlMessage, Conversation c) {
Set<XmppAxolotlSession> remoteSessions = findSessionsForConversation(c);
final boolean acceptEmpty = c.getMode() == Conversation.MODE_MULTI && c.getMucOptions().getUserCount() == 0;
Collection<XmppAxolotlSession> ownSessions = findOwnSessions();
if (remoteSessions.isEmpty()) {
if (remoteSessions.isEmpty() && !acceptEmpty) {
return false;
}
for (XmppAxolotlSession session : remoteSessions) {