diff options
author | Christian Schneppe <christian@pix-art.de> | 2018-07-09 22:24:03 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2018-07-09 22:24:03 +0200 |
commit | 71dbbbd2674fe7651c1444adc1ac760beeccb650 (patch) | |
tree | ebdf2c2396799a231aece1fb67d4c01a3f3bc28a /src/main/java/de/pixart/messenger/entities | |
parent | 3087a62410d8128dac82fec47d36417376714e3b (diff) |
support mam:1
Diffstat (limited to '')
-rw-r--r-- | src/main/java/de/pixart/messenger/entities/MucOptions.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/main/java/de/pixart/messenger/entities/MucOptions.java b/src/main/java/de/pixart/messenger/entities/MucOptions.java index 47ca622fc..1b60a8c97 100644 --- a/src/main/java/de/pixart/messenger/entities/MucOptions.java +++ b/src/main/java/de/pixart/messenger/entities/MucOptions.java @@ -11,8 +11,8 @@ import java.util.Set; import de.pixart.messenger.Config; import de.pixart.messenger.R; +import de.pixart.messenger.services.MessageArchiveService; import de.pixart.messenger.utils.JidHelper; -import de.pixart.messenger.utils.Namespace; import de.pixart.messenger.utils.UIHelper; import de.pixart.messenger.xmpp.chatstate.ChatState; import de.pixart.messenger.xmpp.forms.Data; @@ -66,6 +66,10 @@ public class MucOptions { } } + public boolean mamSupport() { + return MessageArchiveService.Version.has(getFeatures()); + } + public enum Affiliation { OWNER("owner", 4, R.string.owner), ADMIN("admin", 3, R.string.admin), @@ -455,12 +459,8 @@ public class MucOptions { return conversation.getBooleanAttribute(Conversation.ATTRIBUTE_MEMBERS_ONLY, false); } - public boolean mamSupport() { - return hasFeature(Namespace.MAM) || hasFeature(Namespace.MAM_LEGACY); - } - - public boolean mamLegacy() { - return hasFeature(Namespace.MAM_LEGACY) && !hasFeature(Namespace.MAM); + public List<String> getFeatures() { + return this.serviceDiscoveryResult != null ? this.serviceDiscoveryResult.features : Collections.emptyList(); } public boolean nonanonymous() { |