make config flag for leave before join
This commit is contained in:
parent
016124b548
commit
4142360189
2 changed files with 5 additions and 2 deletions
|
@ -130,6 +130,7 @@ public final class Config {
|
|||
public static final boolean ONLY_INTERNAL_STORAGE = false; //use internal storage instead of sdcard to save attachments
|
||||
|
||||
public static final boolean IGNORE_ID_REWRITE_IN_MUC = true;
|
||||
public static final boolean MUC_LEAVE_BEFORE_JOIN = true;
|
||||
|
||||
public static final long MAM_MAX_CATCHUP = MILLISECONDS_IN_DAY * 5;
|
||||
public static final int MAM_MAX_MESSAGES = 750;
|
||||
|
|
|
@ -1581,7 +1581,7 @@ public class XmppConnectionService extends Service {
|
|||
|
||||
final boolean inProgressJoin;
|
||||
synchronized (account.inProgressConferenceJoins) {
|
||||
inProgressJoin = conversation.getMode() == Conversational.MODE_MULTI && account.inProgressConferenceJoins.contains(conversation);
|
||||
inProgressJoin = conversation.getMode() == Conversational.MODE_MULTI && (account.inProgressConferenceJoins.contains(conversation) || account.pendingConferenceJoins.contains(conversation));
|
||||
}
|
||||
|
||||
if (account.isOnlineAndConnected() && !inProgressJoin) {
|
||||
|
@ -2819,7 +2819,9 @@ public class XmppConnectionService extends Service {
|
|||
synchronized (account.inProgressConferenceJoins) {
|
||||
account.inProgressConferenceJoins.add(conversation);
|
||||
}
|
||||
sendPresencePacket(account, mPresenceGenerator.leave(conversation.getMucOptions()));
|
||||
if (Config.MUC_LEAVE_BEFORE_JOIN) {
|
||||
sendPresencePacket(account, mPresenceGenerator.leave(conversation.getMucOptions()));
|
||||
}
|
||||
conversation.resetMucOptions();
|
||||
if (onConferenceJoined != null) {
|
||||
conversation.getMucOptions().flagNoAutoPushConfiguration();
|
||||
|
|
Reference in a new issue