]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
truncate retweeted stuff if it's too long
authorEvan Prodromou <evan@status.net>
Sun, 5 Sep 2010 04:32:56 +0000 (00:32 -0400)
committerEvan Prodromou <evan@status.net>
Tue, 7 Sep 2010 08:00:58 +0000 (04:00 -0400)
plugins/TwitterBridge/daemons/twitterstatusfetcher.php

index 6f0bddd04139b722d3b4ae92f7424f8b6fb8309d..e897cc6ea0e7f215a1edc89cadb2a233c2b5cb6c 100755 (executable)
@@ -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',