diff options
author | Vitaly Takmazov | 2015-12-29 01:00:44 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2015-12-29 01:00:44 +0300 |
commit | 4ea87cbb9ba25eebe6df0896f98a90e24eb4d7e3 (patch) | |
tree | 425c3f931696b6d661ea86710b412f489af89722 | |
parent | c0cc0afdd385bd11a381e976280d473bba2f468a (diff) |
push: fix message user_id parsing
-rw-r--r-- | src/main/java/com/juick/PushComponent.java | 9 |
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); |