diff options
author | Vitaly Takmazov | 2017-11-13 23:39:26 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2017-11-13 23:39:26 +0300 |
commit | ea9703f962244dde404ec43bd157145926f2e3c0 (patch) | |
tree | 873ca270781c26584fbc0708562640f3de45fbda /juick-crosspost/src | |
parent | cce55b64101dbb7a43112701427566f671b12b6a (diff) |
crosspost: Twitter limit is 280 characters now
Diffstat (limited to 'juick-crosspost/src')
-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 6bcf7c81..30a6a989 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() > 115) { - status = status.substring(0, 114) + "…"; + if (status.length() > 265) { + status = status.substring(0, 264) + "…"; } status += " http://juick.com/" + jmsg.getMid(); Twitter twitter = new TwitterTemplate(twitter_consumer_key, twitter_consumer_secret, t.getToken(), t.getSecret()); |