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

Merge pull request #132 from vanitasvitae/fixMamTest

Make sure, archiving is activated
This commit is contained in:
Florian Schmaus 2017-05-31 09:28:26 +02:00 committed by GitHub
commit f19a3a03ba

View file

@ -31,6 +31,7 @@ import org.jivesoftware.smack.XMPPException.XMPPErrorException;
import org.jivesoftware.smack.packet.Message;
import org.jivesoftware.smackx.forward.packet.Forwarded;
import org.jivesoftware.smackx.mam.MamManager.MamQueryResult;
import org.jivesoftware.smackx.mam.element.MamPrefsIQ;
import org.jxmpp.jid.EntityBareJid;
public class MamIntegrationTest extends AbstractSmackIntegrationTest {
@ -55,6 +56,9 @@ public class MamIntegrationTest extends AbstractSmackIntegrationTest {
EntityBareJid userOne = conOne.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);
String messageId = message.setStanzaId();
String messageBody = "test message";