From 1a5a47dc89b576b3fd6e555b6196973d0d9e32c3 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 21 Jul 2016 14:22:03 +0300 Subject: JuickProtocol: subscribe to own message --- juick-core/src/main/java/com/juick/server/protocol/JuickProtocol.java | 1 + 1 file changed, 1 insertion(+) (limited to 'juick-core') diff --git a/juick-core/src/main/java/com/juick/server/protocol/JuickProtocol.java b/juick-core/src/main/java/com/juick/server/protocol/JuickProtocol.java index bb7615dd..f7056cd4 100644 --- a/juick-core/src/main/java/com/juick/server/protocol/JuickProtocol.java +++ b/juick-core/src/main/java/com/juick/server/protocol/JuickProtocol.java @@ -65,6 +65,7 @@ public class JuickProtocol { List tags = TagQueries.fromString(sql, input, false); String body = input.substring(TagQueries.toString(tags).length()); int mid = MessagesQueries.createMessage(sql, user.getUID(), body, null, tags); + SubscriptionsQueries.subscribeMessage(sql, mid, user.getUID()); //app.events().publishEvent(new JuickMessageEvent(app.messages().getMessage(mid))); return new ProtocolReply("New message posted.\n#" + mid + " " + baseUri + mid, Optional.of(json.serializeList(Collections.singletonList(MessagesQueries.getMessage(sql, mid))))); -- cgit v1.2.3