1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-12-22 18:48:00 +01:00

Fix MamManager.isSupported(): Use archive address

This commit is contained in:
Florian Schmaus 2018-06-06 08:39:44 +02:00
parent 5ae164f670
commit a3cf1ab0ca

View file

@ -51,7 +51,6 @@ import org.jivesoftware.smackx.rsm.packet.RSMSet;
import org.jivesoftware.smackx.xdata.FormField;
import org.jivesoftware.smackx.xdata.packet.DataForm;
import org.jxmpp.jid.BareJid;
import org.jxmpp.jid.EntityBareJid;
import org.jxmpp.jid.EntityFullJid;
import org.jxmpp.jid.Jid;
@ -636,8 +635,9 @@ public final class MamManager extends Manager {
* @see <a href="https://xmpp.org/extensions/xep-0313.html#support">XEP-0313 § 7. Determining support</a>
*/
public boolean isSupported() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
BareJid myBareJid = connection().getUser().asBareJid();
return serviceDiscoveryManager.supportsFeature(myBareJid, MamElements.NAMESPACE);
// Note that this may return 'null' but SDM's supportsFeature() does the right thing then.
Jid archiveAddress = getArchiveAddress();
return serviceDiscoveryManager.supportsFeature(archiveAddress, MamElements.NAMESPACE);
}
private static DataForm getNewMamForm() {