From 2a1e7e46568e285bef994799269ad1785e30fb25 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Sun, 21 Oct 2018 18:48:31 +0300 Subject: Trim PMs --- .../src/main/java/com/juick/service/PMQueriesServiceImpl.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/juick-server/src/main/java/com/juick/service/PMQueriesServiceImpl.java b/juick-server/src/main/java/com/juick/service/PMQueriesServiceImpl.java index ab153006..712e4b0e 100644 --- a/juick-server/src/main/java/com/juick/service/PMQueriesServiceImpl.java +++ b/juick-server/src/main/java/com/juick/service/PMQueriesServiceImpl.java @@ -80,7 +80,7 @@ public class PMQueriesServiceImpl extends BaseJdbcService implements PMQueriesSe u.setUid(rs.getInt(1)); u.setName(rs.getString(2)); u.setLastMessageTimestamp(rs.getTimestamp(3).toInstant()); - u.setLastMessageText(rs.getString(4)); + u.setLastMessageText(rs.getString(4).trim()); return u; }, user.getUid(), user.getUid()); @@ -104,7 +104,7 @@ public class PMQueriesServiceImpl extends BaseJdbcService implements PMQueriesSe user.setUid(uuid); user.setName(rs.getString(4)); msg.setUser(user); - msg.setText(rs.getString(2)); + msg.setText(rs.getString(2).trim()); msg.setTimestamp(rs.getTimestamp(3).toInstant()); return msg; }); @@ -121,7 +121,7 @@ public class PMQueriesServiceImpl extends BaseJdbcService implements PMQueriesSe msg.setUser(new User()); msg.getUser().setUid(rs.getInt(1)); msg.getUser().setName(rs.getString(2)); - msg.setText(rs.getString(3)); + msg.setText(rs.getString(3).trim()); msg.setTimestamp(rs.getTimestamp(4).toInstant()); return msg; }, @@ -140,7 +140,7 @@ public class PMQueriesServiceImpl extends BaseJdbcService implements PMQueriesSe msg.setUser(new User()); msg.getUser().setUid(rs.getInt(1)); msg.getUser().setName(rs.getString(2)); - msg.setText(rs.getString(3)); + msg.setText(rs.getString(3).trim()); msg.setTimestamp(rs.getTimestamp(4).toInstant()); return msg; }, -- cgit v1.2.3