@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
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

When an object is referenced by URI, treat it like a mention

Summary:
Ref T13291. Currently, `T123` is a mention and adds an "alice mentioned this on Txxx." to `T123`, but `https://install.com/T123` is not a mention.

Make the full URI a mention.

Test Plan: Commented a full URI, saw the target object get a mention story in its timeline.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13291

Differential Revision: https://secure.phabricator.com/D20527

+11 -2
+11 -2
src/applications/meta/engineextension/PhabricatorSelfHyperlinkEngineExtension.php
··· 53 53 } 54 54 55 55 if ($object_map) { 56 - $handles = $viewer->loadHandles(mpull($object_map, 'getPHID')); 56 + $object_phids = mpull($object_map, 'getPHID'); 57 57 } else { 58 - $handles = array(); 58 + $object_phids = array(); 59 59 } 60 + 61 + $handles = $viewer->loadHandles($object_phids); 60 62 61 63 foreach ($object_names as $key => $object_name) { 62 64 $object = idx($object_map, $object_name); ··· 83 85 84 86 unset($self_links[$key]); 85 87 } 88 + 89 + $key_mentioned = PhabricatorObjectRemarkupRule::KEY_MENTIONED_OBJECTS; 90 + $mentioned_phids = $engine->getTextMetadata($key_mentioned, array()); 91 + foreach ($object_phids as $object_phid) { 92 + $mentioned_phids[$object_phid] = $object_phid; 93 + } 94 + $engine->setTextMetadata($key_mentioned, $mentioned_phids); 86 95 } 87 96 88 97 }