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
···9393 public function getURI() {
9494 $raw = $this->raw;
95959696- if ($this->isIssueEvent()) {
9797- if ($this->type == self::TYPE_ISSUE) {
9898- $uri = idxv($raw, array('issue', 'html_url'));
9999- $uri = $uri.'#event-'.$this->getID();
100100- } else {
101101- $uri = idxv($raw, array('payload', 'issue', 'html_url'));
102102- $uri = $uri.'#event-'.$this->getID();
103103- }
104104- } else if ($this->isPullRequestEvent()) {
9696+ if ($this->isIssueEvent() || $this->isPullRequestEvent()) {
10597 if ($this->type == self::TYPE_ISSUE) {
10698 $uri = idxv($raw, array('issue', 'html_url'));
10799 $uri = $uri.'#event-'.$this->getID();
···109101 // The format of pull request events varies so we need to fish around
110102 // a bit to find the correct URI.
111103 $uri = idxv($raw, array('payload', 'pull_request', 'html_url'));
104104+ $need_anchor = true;
105105+106106+ // For comments, we get a different anchor to link to the comment. In
107107+ // this case, the URI comes with an anchor already.
108108+ if (!$uri) {
109109+ $uri = idxv($raw, array('payload', 'comment', 'html_url'));
110110+ $need_anchor = false;
111111+ }
112112+112113 if (!$uri) {
113114 $uri = idxv($raw, array('payload', 'issue', 'html_url'));
115115+ $need_anchor = true;
114116 }
115115- $uri = $uri.'#event-'.$this->getID();
117117+118118+ if ($need_anchor) {
119119+ $uri = $uri.'#event-'.$this->getID();
120120+ }
116121 }
117122 } else {
118123 switch ($this->getIssueRawKind()) {