aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib/Activity.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2023-03-02 21:15:19 +0000
committerMario <mario@mariovavti.com>2023-03-02 21:15:19 +0000
commitda034045cc1bba74287b7c3e83f4a94ff5359150 (patch)
tree10e2ae77b7ab81811cf8e63cf5a38cf04761ebf4 /Zotlabs/Lib/Activity.php
parent65f001b4b7dcf23ee80e137cfca64993a3da5318 (diff)
downloadvolse-hubzilla-da034045cc1bba74287b7c3e83f4a94ff5359150.tar.gz
volse-hubzilla-da034045cc1bba74287b7c3e83f4a94ff5359150.tar.bz2
volse-hubzilla-da034045cc1bba74287b7c3e83f4a94ff5359150.zip
some work on bringing bang tags back for forums
Diffstat (limited to 'Zotlabs/Lib/Activity.php')
-rw-r--r--Zotlabs/Lib/Activity.php13
1 files changed, 11 insertions, 2 deletions
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php
index dc868c93e..60284c56d 100644
--- a/Zotlabs/Lib/Activity.php
+++ b/Zotlabs/Lib/Activity.php
@@ -570,7 +570,12 @@ class Activity {
break;
case 'Mention':
- $ret[] = ['ttype' => TERM_MENTION, 'url' => $t['href'], 'term' => escape_tags((substr($t['name'], 0, 1) === '@') ? substr($t['name'], 1) : $t['name'])];
+ $mention_type = substr($t['name'], 0, 1);
+ if ($mention_type === '!') {
+ $ret[] = ['ttype' => TERM_FORUM, 'url' => $t['href'], 'term' => escape_tags(substr($t['name'], 1))];
+ } else {
+ $ret[] = ['ttype' => TERM_MENTION, 'url' => $t['href'], 'term' => escape_tags((substr($t['name'], 0, 1) === '@') ? substr($t['name'], 1) : $t['name'])];
+ }
break;
case 'Bookmark':
@@ -605,6 +610,10 @@ class Activity {
$ret[] = ['type' => 'Mention', 'href' => $t['url'], 'name' => '@' . $t['term']];
break;
+ case TERM_FORUM:
+ $ret[] = ['type' => 'Mention', 'href' => $t['url'], 'name' => '!' . $t['term']];
+ break;
+
case TERM_BOOKMARK:
$ret[] = ['type' => 'Bookmark', 'href' => $t['url'], 'name' => $t['term']];
break;
@@ -936,7 +945,7 @@ class Activity {
if (!$t['url']) {
continue;
}
- if ($t['ttype'] == TERM_MENTION) {
+ if (in_array($t['ttype'], [TERM_MENTION, TERM_FORUM])) {
$url = self::lookup_term_url($t['url']);
$list[] = (($url) ? $url : $t['url']);
}