aboutsummaryrefslogtreecommitdiff
path: root/juick-core/src/main
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2016-07-21 14:22:03 +0300
committerGravatar Vitaly Takmazov2016-07-21 14:22:03 +0300
commit1a5a47dc89b576b3fd6e555b6196973d0d9e32c3 (patch)
tree45cc2d9c74a0c05635652f1e17d60f3f7ad23002 /juick-core/src/main
parent477dc450dca99616fa335c155c4be9048a69deee (diff)
JuickProtocol: subscribe to own message
Diffstat (limited to 'juick-core/src/main')
-rw-r--r--juick-core/src/main/java/com/juick/server/protocol/JuickProtocol.java1
1 files changed, 1 insertions, 0 deletions
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<Tag> 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)))));