aboutsummaryrefslogtreecommitdiff
path: root/juick-www/src/main
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2017-08-21 11:46:52 +0300
committerGravatar Vitaly Takmazov2017-08-21 11:46:52 +0300
commita84c81145cfdded4d81270a7bfa859ed69987ce7 (patch)
treef211ae2fff3f717f32cd292089ad14fabdeea2ac /juick-www/src/main
parentec2fe20004b054ddef048246894f5df9748160c9 (diff)
www: invert twitter/fb sharing logic
Diffstat (limited to 'juick-www/src/main')
-rw-r--r--juick-www/src/main/java/com/juick/www/controllers/NewMessage.java4
1 files changed, 2 insertions, 2 deletions
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()