aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2017-12-10 20:51:18 +0100
committerChristian Schneppe <christian@pix-art.de>2017-12-10 20:51:18 +0100
commitc445b63eba06af69e301b2f30d8f473447d4179e (patch)
tree3523625cf1a339d9fe69bf1760a87c88b0c95170 /src/main/java/de/pixart
parentdad254b86afa06dc127f84aad382d6b8cbc5f24e (diff)
fixed publish-options migration
Diffstat (limited to 'src/main/java/de/pixart')
-rw-r--r--src/main/java/de/pixart/messenger/crypto/axolotl/AxolotlService.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/crypto/axolotl/AxolotlService.java b/src/main/java/de/pixart/messenger/crypto/axolotl/AxolotlService.java
index 26c364eac..a6f5d5b04 100644
--- a/src/main/java/de/pixart/messenger/crypto/axolotl/AxolotlService.java
+++ b/src/main/java/de/pixart/messenger/crypto/axolotl/AxolotlService.java
@@ -602,7 +602,15 @@ public class AxolotlService implements OnAdvancedStreamFeaturesLoaded {
Log.d(Config.LOGTAG, getLogprefix(account) + "publishBundlesIfNeeded called, but PEP is broken. Ignoring... ");
return;
}
- this.changeAccessMode.set(account.isOptionSet(Account.OPTION_REQUIRES_ACCESS_MODE_CHANGE) && account.getXmppConnection().getFeatures().pepPublishOptions());
+
+ if (account.getXmppConnection().getFeatures().pepPublishOptions()) {
+ this.changeAccessMode.set(account.isOptionSet(Account.OPTION_REQUIRES_ACCESS_MODE_CHANGE));
+ } else {
+ if (account.setOption(Account.OPTION_REQUIRES_ACCESS_MODE_CHANGE, true)) {
+ Log.d(Config.LOGTAG, account.getJid().toBareJid() + ": server doesn’t support publish-options. setting for later access mode change");
+ mXmppConnectionService.databaseBackend.updateAccount(account);
+ }
+ }
if (this.changeAccessMode.get()) {
Log.d(Config.LOGTAG, account.getJid().toBareJid() + ": server gained publish-options capabilities. changing access model");
}