From 8a0fbbd35c13054a947ea0d27ca117542bc452b9 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 18 May 2018 15:33:38 +0300 Subject: JPA WIP --- juick-www/src/main/java/com/juick/www/controllers/NewMessage.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'juick-www/src/main/java/com/juick/www/controllers/NewMessage.java') diff --git a/juick-www/src/main/java/com/juick/www/controllers/NewMessage.java b/juick-www/src/main/java/com/juick/www/controllers/NewMessage.java index a464add2..a88698af 100644 --- a/juick-www/src/main/java/com/juick/www/controllers/NewMessage.java +++ b/juick-www/src/main/java/com/juick/www/controllers/NewMessage.java @@ -161,7 +161,7 @@ public class NewMessage { params.add("body", rid == 0 ? String.format("#%d %s", mid, body) : String.format("#%d/%d %s", mid, rid, body)); - params.add("hash", userService.getHashByUID(visitor.getUid())); + params.add("hash", userService.getHashForUser(visitor)); if (StringUtils.isNotEmpty(attachmentFName.toString())) { params.add("img", attachmentFName.toASCIIString()); } @@ -203,7 +203,7 @@ public class NewMessage { HttpEntity> request = new HttpEntity<>(params, headers); params.add("body", String.format("@%s %s", userTo.getName(), body)); - params.add("hash", userService.getHashByUID(visitor.getUid())); + params.add("hash", userService.getHashForUser(visitor)); URI postUri = UriComponentsBuilder.fromUriString(apiUrl).path("/post").build().toUri(); ResponseEntity result = rest.postForEntity( postUri, @@ -240,7 +240,7 @@ public class NewMessage { HttpEntity> request = new HttpEntity<>(params, headers); params.add("body", body); - params.add("hash", userService.getHashByUID(visitor.getUid())); + params.add("hash", userService.getHashForUser(visitor)); if (StringUtils.isNotEmpty(attachmentFName.toString())) { params.add("img", attachmentFName.toASCIIString()); } -- cgit v1.2.3