diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2016-04-11 22:20:32 +0200 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2016-04-11 22:20:32 +0200 |
commit | 7ff890e513212f1cf03667e4ea7e429431d811c4 (patch) | |
tree | 779360a59b84b9d7ab7f33fa63b5c098d3fc9aff /src/main/java/eu/siacs/conversations/xmpp | |
parent | 23a0beab43a5f30baf6481afeb9188b86df0b32d (diff) |
republish avatar if server offers non-persistent pep :-(
Diffstat (limited to 'src/main/java/eu/siacs/conversations/xmpp')
-rw-r--r-- | src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java b/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java index 7bc08e9c..4dc5492e 100644 --- a/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java +++ b/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java @@ -1530,13 +1530,15 @@ public class XmppConnection implements Runnable { public boolean pep() { synchronized (XmppConnection.this.disco) { - ServiceDiscoveryResult info = disco.get(account.getServer()); - if (info != null && info.hasIdentity("pubsub", "pep")) { - return true; - } else { - info = disco.get(account.getJid().toBareJid()); - return info != null && info.hasIdentity("pubsub", "pep"); - } + ServiceDiscoveryResult info = disco.get(account.getJid().toBareJid()); + return info != null && info.hasIdentity("pubsub", "pep"); + } + } + + public boolean pepPersistent() { + synchronized (XmppConnection.this.disco) { + ServiceDiscoveryResult info = disco.get(account.getJid().toBareJid()); + return info != null && info.getFeatures().contains("http://jabber.org/protocol/pubsub#persistent-items"); } } |