Select the types of activity you want to include in your feed.
@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.)
hq.recaptime.dev/wiki/Phorge
···169169 $fields[$name] = $data;
170170 }
171171172172+ // This is another piece of special-cased magic which allows you to
173173+ // enter a ridiculously long title, or just type a big block of stream
174174+ // of consciousness text, and have some sort of reasonable result conjured
175175+ // from it.
176176+ if (isset($fields['title'])) {
177177+ $terminal = '...';
178178+ $title = $fields['title'];
179179+ $short = phutil_utf8_shorten($title, 250, $terminal);
180180+ if ($short != $title) {
181181+182182+ // If we shortened the title, split the rest into the summary, so
183183+ // we end up with a title like:
184184+ //
185185+ // Title title tile title title...
186186+ //
187187+ // ...and a summary like:
188188+ //
189189+ // ...title title title.
190190+ //
191191+ // Summary summary summary summary.
192192+193193+ $summary = idx($fields, 'summary', '');
194194+ $offset = strlen($short) - strlen($terminal);
195195+ $remainder = ltrim(substr($fields['title'], $offset));
196196+ $summary = '...'.$remainder."\n\n".$summary;
197197+ $summary = rtrim($summary, "\n");
198198+199199+ $fields['title'] = $short;
200200+ $fields['summary'] = $summary;
201201+ }
202202+ }
203203+172204 return $fields;
173205 }
174206