truncate retweeted stuff if it's too long

This commit is contained in:
Evan Prodromou 2010-09-05 00:32:56 -04:00
parent 9847bffe99
commit 702d36257c

View File

@ -274,6 +274,12 @@ class TwitterStatusFetcher extends ParallelizingDaemon
$content = sprintf(_('RT @%1$s %2$s'), $content = sprintf(_('RT @%1$s %2$s'),
$author->nickname, $author->nickname,
$original->content); $original->content);
if (Notice::contentTooLong($content)) {
$contentlimit = Notice::maxContent();
$content = mb_substr($content, 0, $contentlimit - 4) . ' ...';
}
$repeat = Notice::saveNew($profile->id, $repeat = Notice::saveNew($profile->id,
$content, $content,
'twitter', 'twitter',