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

Make sure, archiving is enabled

This commit is contained in:
vanitasvitae 2017-05-29 22:32:14 +02:00
parent ce1cddc722
commit 655cd873a3
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311

View file

@ -31,6 +31,7 @@ import org.jivesoftware.smack.XMPPException.XMPPErrorException;
import org.jivesoftware.smack.packet.Message; import org.jivesoftware.smack.packet.Message;
import org.jivesoftware.smackx.forward.packet.Forwarded; import org.jivesoftware.smackx.forward.packet.Forwarded;
import org.jivesoftware.smackx.mam.MamManager.MamQueryResult; import org.jivesoftware.smackx.mam.MamManager.MamQueryResult;
import org.jivesoftware.smackx.mam.element.MamPrefsIQ;
import org.jxmpp.jid.EntityBareJid; import org.jxmpp.jid.EntityBareJid;
public class MamIntegrationTest extends AbstractSmackIntegrationTest { public class MamIntegrationTest extends AbstractSmackIntegrationTest {
@ -55,6 +56,9 @@ public class MamIntegrationTest extends AbstractSmackIntegrationTest {
EntityBareJid userOne = conOne.getUser().asEntityBareJid(); EntityBareJid userOne = conOne.getUser().asEntityBareJid();
EntityBareJid userTwo = conTwo.getUser().asEntityBareJid(); EntityBareJid userTwo = conTwo.getUser().asEntityBareJid();
//Make sure MAM is archiving messages
mamManagerConTwo.updateArchivingPreferences(null, null, MamPrefsIQ.DefaultBehavior.always);
Message message = new Message(userTwo); Message message = new Message(userTwo);
String messageId = message.setStanzaId(); String messageId = message.setStanzaId();
String messageBody = "test message"; String messageBody = "test message";