diff options
author | Vitaly Takmazov | 2017-11-21 11:18:43 +0000 |
---|---|---|
committer | Vitaly Takmazov | 2017-11-21 11:18:43 +0000 |
commit | f02c409c58ab0d12ee8096287d0740438e18ef01 (patch) | |
tree | 906c351c8cdeedf9cfde8d78ca5b8530b409272d /juick-crosspost | |
parent | 2efaf52caa8c42ec30ba9967c5f5841e874e22f4 (diff) |
crosspost: fix tweet length
Diffstat (limited to 'juick-crosspost')
-rw-r--r-- | juick-crosspost/src/main/java/com/juick/service/Crosspost.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/juick-crosspost/src/main/java/com/juick/service/Crosspost.java b/juick-crosspost/src/main/java/com/juick/service/Crosspost.java index 30a6a989..55c4407c 100644 --- a/juick-crosspost/src/main/java/com/juick/service/Crosspost.java +++ b/juick-crosspost/src/main/java/com/juick/service/Crosspost.java @@ -149,8 +149,8 @@ public class Crosspost implements ApplicationListener<MessageEvent> { public void twitterPost(final com.juick.Message jmsg) { crosspostService.getTwitterToken(jmsg.getUser().getUid()).ifPresent(t -> { String status = MessageUtils.getMessageHashTags(jmsg) + jmsg.getText(); - if (status.length() > 265) { - status = status.substring(0, 264) + "…"; + if (status.length() > 255) { + status = status.substring(0, 254) + "…"; } status += " http://juick.com/" + jmsg.getMid(); Twitter twitter = new TwitterTemplate(twitter_consumer_key, twitter_consumer_secret, t.getToken(), t.getSecret()); |