show pep as available if omemo_all_access has been installed on server
This commit is contained in:
parent
c5ee541906
commit
127557df56
|
@ -63,6 +63,7 @@ public class AxolotlService implements OnAdvancedStreamFeaturesLoaded {
|
||||||
public static final String PEP_DEVICE_LIST_NOTIFY = PEP_DEVICE_LIST + "+notify";
|
public static final String PEP_DEVICE_LIST_NOTIFY = PEP_DEVICE_LIST + "+notify";
|
||||||
public static final String PEP_BUNDLES = PEP_PREFIX + ".bundles";
|
public static final String PEP_BUNDLES = PEP_PREFIX + ".bundles";
|
||||||
public static final String PEP_VERIFICATION = PEP_PREFIX + ".verification";
|
public static final String PEP_VERIFICATION = PEP_PREFIX + ".verification";
|
||||||
|
public static final String PEP_OMEMO_WHITELISTED = PEP_PREFIX + ".whitelisted";
|
||||||
|
|
||||||
public static final String LOGPREFIX = "AxolotlService";
|
public static final String LOGPREFIX = "AxolotlService";
|
||||||
|
|
||||||
|
|
|
@ -913,7 +913,7 @@ public class EditAccountActivity extends OmemoActivity implements OnAccountUpdat
|
||||||
AxolotlService axolotlService = this.mAccount.getAxolotlService();
|
AxolotlService axolotlService = this.mAccount.getAxolotlService();
|
||||||
if (axolotlService != null && axolotlService.isPepBroken()) {
|
if (axolotlService != null && axolotlService.isPepBroken()) {
|
||||||
this.mServerInfoPep.setText(R.string.server_info_broken);
|
this.mServerInfoPep.setText(R.string.server_info_broken);
|
||||||
} else if (features.pepPublishOptions()) {
|
} else if (features.pepPublishOptions() || features.pepOmemoWhitelisted()) {
|
||||||
this.mServerInfoPep.setText(R.string.server_info_available);
|
this.mServerInfoPep.setText(R.string.server_info_available);
|
||||||
} else {
|
} else {
|
||||||
this.mServerInfoPep.setText(R.string.server_info_partial);
|
this.mServerInfoPep.setText(R.string.server_info_partial);
|
||||||
|
|
|
@ -53,6 +53,7 @@ import de.duenndns.ssl.DomainHostnameVerifier;
|
||||||
import de.duenndns.ssl.MemorizingTrustManager;
|
import de.duenndns.ssl.MemorizingTrustManager;
|
||||||
import eu.siacs.conversations.Config;
|
import eu.siacs.conversations.Config;
|
||||||
import eu.siacs.conversations.crypto.XmppDomainVerifier;
|
import eu.siacs.conversations.crypto.XmppDomainVerifier;
|
||||||
|
import eu.siacs.conversations.crypto.axolotl.AxolotlService;
|
||||||
import eu.siacs.conversations.crypto.sasl.Anonymous;
|
import eu.siacs.conversations.crypto.sasl.Anonymous;
|
||||||
import eu.siacs.conversations.crypto.sasl.DigestMd5;
|
import eu.siacs.conversations.crypto.sasl.DigestMd5;
|
||||||
import eu.siacs.conversations.crypto.sasl.External;
|
import eu.siacs.conversations.crypto.sasl.External;
|
||||||
|
@ -1708,10 +1709,11 @@ public class XmppConnection implements Runnable {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean pepPublishOptions() {
|
public boolean pepPublishOptions() {
|
||||||
synchronized (XmppConnection.this.disco) {
|
return hasDiscoFeature(account.getJid().toBareJid(),Namespace.PUBSUB_PUBLISH_OPTIONS);
|
||||||
ServiceDiscoveryResult info = disco.get(account.getJid().toBareJid());
|
}
|
||||||
return info != null && info.getFeatures().contains(Namespace.PUBSUB_PUBLISH_OPTIONS);
|
|
||||||
}
|
public boolean pepOmemoWhitelisted() {
|
||||||
|
return hasDiscoFeature(account.getJid().toBareJid(), AxolotlService.PEP_OMEMO_WHITELISTED);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean mam() {
|
public boolean mam() {
|
||||||
|
|
Loading…
Reference in New Issue