From a84c81145cfdded4d81270a7bfa859ed69987ce7 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Mon, 21 Aug 2017 11:46:52 +0300 Subject: www: invert twitter/fb sharing logic --- juick-www/src/main/java/com/juick/www/controllers/NewMessage.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'juick-www') 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 79102f18..46a5660d 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 @@ -184,7 +184,7 @@ public class NewMessage { model.addAttribute("url", "http://juick.com/" + mid); - if (crosspostService.getTwitterTokens(visitor.getUid()).isPresent()) { + if (!crosspostService.getTwitterTokens(visitor.getUid()).isPresent()) { String sharetwi = hashtags + " " + body; if (sharetwi.length() > 115) { sharetwi = sharetwi.substring(0, 114) + "…"; @@ -192,7 +192,7 @@ public class NewMessage { sharetwi += " http://juick.com/" + mid; model.addAttribute("sharetwi", sharetwi); } - if (crosspostService.getFacebookToken(visitor.getUid()).isPresent()) { + if (!crosspostService.getFacebookToken(visitor.getUid()).isPresent()) { model.addAttribute("facebook", 1); } model.addAttribute("tags", tagService.getUserTagStats(visitor.getUid()).stream() -- cgit v1.2.3