From: Evan Prodromou Date: Sun, 5 Sep 2010 04:32:56 +0000 (-0400) Subject: truncate retweeted stuff if it's too long X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=981f6a47492f893f4d039fced0f66bed94a18bbc;p=quix0rs-gnu-social.git truncate retweeted stuff if it's too long --- diff --git a/plugins/TwitterBridge/daemons/twitterstatusfetcher.php b/plugins/TwitterBridge/daemons/twitterstatusfetcher.php index 6f0bddd041..e897cc6ea0 100755 --- a/plugins/TwitterBridge/daemons/twitterstatusfetcher.php +++ b/plugins/TwitterBridge/daemons/twitterstatusfetcher.php @@ -274,6 +274,12 @@ class TwitterStatusFetcher extends ParallelizingDaemon $content = sprintf(_('RT @%1$s %2$s'), $author->nickname, $original->content); + + if (Notice::contentTooLong($content)) { + $contentlimit = Notice::maxContent(); + $content = mb_substr($content, 0, $contentlimit - 4) . ' ...'; + } + $repeat = Notice::saveNew($profile->id, $content, 'twitter',