aboutsummaryrefslogtreecommitdiff
path: root/juick-server
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-04-10 10:23:21 +0300
committerGravatar Vitaly Takmazov2018-04-10 10:23:21 +0300
commit47ca89612bb367ae0a48987e2dc65d77a2b243a4 (patch)
tree63a184bfc6d7292a7bd562fffbf7449f3d72ab68 /juick-server
parenta8094e3b0e3c81d8f77f9ccf07d2d5903a4ff5fa (diff)
fix xmpp flow
Diffstat (limited to 'juick-server')
-rw-r--r--juick-server/src/test/java/com/juick/server/tests/ServerTests.java5
1 files changed, 5 insertions, 0 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 3e17ebce..a9cb306b 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,6 +565,11 @@ 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" +
+ "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));
xmppMessage.setFrom(botJid);
xmppMessage.setTo(botJid.withLocal("pm"));
Message pm = new Message();