aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/test/java/com/juick/server/tests
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-04-10 12:37:02 +0300
committerGravatar Vitaly Takmazov2018-04-10 12:37:02 +0300
commitffc282136234eeb9caf169794fd25e34ee9d5bd2 (patch)
treef561960cfe9db50375c97e71e5ba8178fd0070ea /juick-server/src/test/java/com/juick/server/tests
parentcc8819599c789f0c1b15301bc089eaa08e279ac4 (diff)
fix xmpp messages to bare jid
Diffstat (limited to 'juick-server/src/test/java/com/juick/server/tests')
-rw-r--r--juick-server/src/test/java/com/juick/server/tests/ServerTests.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/juick-server/src/test/java/com/juick/server/tests/ServerTests.java b/juick-server/src/test/java/com/juick/server/tests/ServerTests.java
index a9cb306b..2644b49c 100644
--- a/juick-server/src/test/java/com/juick/server/tests/ServerTests.java
+++ b/juick-server/src/test/java/com/juick/server/tests/ServerTests.java
@@ -565,11 +565,14 @@ public class ServerTests {
xmppMessage.setBody("What's up?");
result = router.incomingMessage(xmppMessage);
assertThat(result.getBody(), startsWith("Private message sent"));
- String xml = "<message xmlns=\"jabber:server\" from=\"juick@localhost\" to=\"renha@serverstorageisfull.tld\" type=\"chat\"><body>@yo:\n" +
+ String xml = "<message xmlns=\"jabber:server\" from=\"" + botJid + "\" to=\"renha@serverstorageisfull.tld\" type=\"chat\"><body>@yo:\n" +
"343432434\n" +
"\n" +
"#2 http://juick.com/2</body><thread>juick-2</thread><juick xmlns=\"http://juick.com/message\" mid=\"2\" privacy=\"1\" quote=\"\" replyto=\"0\" rid=\"0\" ts=\"2018-04-10 06:58:23\"><body>343432434</body><updated></updated><user xmlns=\"http://juick.com/user\" uname=\"yo\" uid=\"2\"></user></juick><nick xmlns=\"http://jabber.org/protocol/nick\">@yo</nick></message>";
result = router.incomingMessage((rocks.xmpp.core.stanza.model.Message)server.parse(xml));
+ String active = "<message xmlns=\"jabber:server\" from=\"renha@serverstorageisfull.tld/work\" to=\""
+ + botJid.asBareJid().toEscapedString() + "\" type=\"chat\" id=\"purple553384c6\"><active xmlns=\"http://jabber.org/protocol/chatstates\"></active></message>";
+ result = router.incomingMessage((rocks.xmpp.core.stanza.model.Message)server.parse(active));
xmppMessage.setFrom(botJid);
xmppMessage.setTo(botJid.withLocal("pm"));
Message pm = new Message();