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
1 changed files with 6 additions and 0 deletions

View File

@ -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',