diff options
author | Evan Prodromou <evan@status.net> | 2010-09-05 00:32:56 -0400 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2010-09-07 04:00:58 -0400 |
commit | 702d36257c6edb1e4f87087c60f1a534fc69a918 (patch) | |
tree | 6679c4962b23a6598bf78debb4f05e96a580110d /plugins/TwitterBridge/daemons/twitterstatusfetcher.php | |
parent | 9847bffe998544ee8aa284849134e86e3c4c598a (diff) |
truncate retweeted stuff if it's too long
Diffstat (limited to 'plugins/TwitterBridge/daemons/twitterstatusfetcher.php')
-rwxr-xr-x | plugins/TwitterBridge/daemons/twitterstatusfetcher.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/plugins/TwitterBridge/daemons/twitterstatusfetcher.php b/plugins/TwitterBridge/daemons/twitterstatusfetcher.php index 6f0bddd04..e897cc6ea 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', |