From 4ea87cbb9ba25eebe6df0896f98a90e24eb4d7e3 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Tue, 29 Dec 2015 01:00:44 +0300 Subject: push: fix message user_id parsing --- src/main/java/com/juick/PushComponent.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/main/java/com') 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 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); -- cgit v1.2.3