From 702d36257c6edb1e4f87087c60f1a534fc69a918 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Sun, 5 Sep 2010 00:32:56 -0400 Subject: [PATCH] truncate retweeted stuff if it's too long --- plugins/TwitterBridge/daemons/twitterstatusfetcher.php | 6 ++++++ 1 file changed, 6 insertions(+) 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',