aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2015-12-29 01:00:44 +0300
committerGravatar Vitaly Takmazov2015-12-29 01:00:44 +0300
commit4ea87cbb9ba25eebe6df0896f98a90e24eb4d7e3 (patch)
tree425c3f931696b6d661ea86710b412f489af89722 /src/main
parentc0cc0afdd385bd11a381e976280d473bba2f468a (diff)
push: fix message user_id parsing
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/com/juick/PushComponent.java9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/main/java/com/juick/PushComponent.java b/src/main/java/com/juick/PushComponent.java
index f4f766a1..527de44e 100644
--- a/src/main/java/com/juick/PushComponent.java
+++ b/src/main/java/com/juick/PushComponent.java
@@ -161,12 +161,7 @@ public class PushComponent implements ServletContextListener, Stream.StreamListe
return;
}
- int uid_to = 0;
- try {
- uid_to = Integer.parseInt(msg.to.Username);
- } catch (Exception e) {
- logger.log(Level.SEVERE, e.getMessage(), e);
- }
+ int uid_to = jmsg.User.UID;
/*** ANDROID ***/
ArrayList<String> regids;
@@ -183,7 +178,7 @@ public class PushComponent implements ServletContextListener, Stream.StreamListe
if (!regids.isEmpty()) {
MessageSerializer messageSerializer = new MessageSerializer();
String json = messageSerializer.serialize(jmsg).toString();
- System.out.println(json);
+ logger.info(json);
Message message = new Message.Builder().addData("message", json).build();
try {
MulticastResult result = GCMSender.send(message, regids, 3);