diff options
author | Vitaly Takmazov | 2016-11-15 14:21:27 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2016-11-15 14:21:27 +0300 |
commit | 51d9de02265d6cc9d6045d79497d2a987ae2f7f7 (patch) | |
tree | d7dd2e534452cab45b8ebdba1e52c498951c5035 /juick-www/src/main/java/com/juick/www/PM.java | |
parent | 32a6feb195171e06d60117ad758cc8beb50e5ca3 (diff) |
core classes are now serializeable with JAXB (to use as babbler extension)
Diffstat (limited to 'juick-www/src/main/java/com/juick/www/PM.java')
-rw-r--r-- | juick-www/src/main/java/com/juick/www/PM.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/juick-www/src/main/java/com/juick/www/PM.java b/juick-www/src/main/java/com/juick/www/PM.java index 8190d65b..2e35ec1c 100644 --- a/juick-www/src/main/java/com/juick/www/PM.java +++ b/juick-www/src/main/java/com/juick/www/PM.java @@ -50,7 +50,7 @@ public class PM { protected void doGetInbox(JdbcTemplate sql, HttpServletRequest request, HttpServletResponse response, com.juick.User visitor) throws ServletException, IOException, PebbleException { String title = "PM: Inbox"; - List<com.juick.Message> msgs = PMQueries.getLastPMInbox(sql, visitor.getUID()); + List<com.juick.Message> msgs = PMQueries.getLastPMInbox(sql, visitor.getUid()); msgs.forEach(m -> m.setText(Utils.formatMessage(m.getText()))); response.setContentType("text/html; charset=UTF-8"); try (PrintWriter out = response.getWriter()) { @@ -67,7 +67,7 @@ public class PM { protected void doGetSent(JdbcTemplate sql, HttpServletRequest request, HttpServletResponse response, com.juick.User visitor) throws ServletException, IOException, PebbleException { String title = "PM: Sent"; - List<com.juick.Message> msgs = PMQueries.getLastPMSent(sql, visitor.getUID()); + List<com.juick.Message> msgs = PMQueries.getLastPMSent(sql, visitor.getUid()); String uname = request.getParameter("uname"); if (!UserUtils.checkUserNameValid(uname)) { @@ -103,12 +103,12 @@ public class PM { return; } - if (UserQueries.isInBLAny(sql, uid, visitor.getUID())) { + if (UserQueries.isInBLAny(sql, uid, visitor.getUid())) { response.sendError(403); return; } - if (PMQueries.createPM(sql, visitor.getUID(), uid, body)) { + if (PMQueries.createPM(sql, visitor.getUid(), uid, body)) { if (xmpp != null) { Message msg = new Message(); msg.from = new JID("juick", "juick.com", null); @@ -127,12 +127,12 @@ public class PM { Message mm = new Message(); mm.to = new JID(jid); mm.type = Message.Type.chat; - if (PMQueries.havePMinRoster(sql, visitor.getUID(), jid)) { - mm.from = new JID(jmsg.getUser().getUName(), "juick.com", "Juick"); + if (PMQueries.havePMinRoster(sql, visitor.getUid(), jid)) { + mm.from = new JID(jmsg.getUser().getName(), "juick.com", "Juick"); mm.body = body; } else { mm.from = new JID("juick", "juick.com", "Juick"); - mm.body = "Private message from @" + jmsg.getUser().getUName() + ":\n" + body; + mm.body = "Private message from @" + jmsg.getUser().getName() + ":\n" + body; } xmpp.send(mm); } |