aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib/Activity.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2019-07-28 20:00:14 -0700
committerzotlabs <mike@macgirvin.com>2019-07-28 20:00:14 -0700
commit70e4a2c4fa69135dea97d1b6323fe6f8e17961c7 (patch)
tree38e8f097ec0d9aecb12dcce0bfcf239af37cebbf /Zotlabs/Lib/Activity.php
parent696359daba11c51d8f733dfa173e48b5e1de69ef (diff)
parent5695350e98a8a2c802ff419c5b29b0f01f0180df (diff)
downloadvolse-hubzilla-70e4a2c4fa69135dea97d1b6323fe6f8e17961c7.tar.gz
volse-hubzilla-70e4a2c4fa69135dea97d1b6323fe6f8e17961c7.tar.bz2
volse-hubzilla-70e4a2c4fa69135dea97d1b6323fe6f8e17961c7.zip
Merge branch 'dev' of https://framagit.org/hubzilla/core into dev
Diffstat (limited to 'Zotlabs/Lib/Activity.php')
-rw-r--r--Zotlabs/Lib/Activity.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php
index 8168e7354..0808228a6 100644
--- a/Zotlabs/Lib/Activity.php
+++ b/Zotlabs/Lib/Activity.php
@@ -361,7 +361,7 @@ class Activity {
switch($t['type']) {
case 'Hashtag':
- $ret[] = [ 'ttype' => TERM_HASHTAG, 'url' => $t['href'], 'term' => escape_tags((substr($t['name'],0,1) === '#') ? substr($t['name'],1) : $t['name']) ];
+ $ret[] = [ 'ttype' => TERM_HASHTAG, 'url' => ((isset($t['href'])) ? $t['href'] : $t['id']), 'term' => escape_tags((substr($t['name'],0,1) === '#') ? substr($t['name'],1) : $t['name']) ];
break;
case 'Mention':
@@ -392,9 +392,9 @@ class Activity {
foreach($item['term'] as $t) {
switch($t['ttype']) {
case TERM_HASHTAG:
- // An id is required so if we don't have a url in the taxonomy, ignore it and keep going.
+ // href is required so if we don't have a url in the taxonomy, ignore it and keep going.
if($t['url']) {
- $ret[] = [ 'id' => $t['url'], 'name' => '#' . $t['term'] ];
+ $ret[] = [ 'type' => 'Hashtag', 'href' => $t['url'], 'name' => '#' . $t['term'] ];
}
break;
@@ -1769,14 +1769,14 @@ class Activity {
}
foreach($ptr as $vurl) {
if(strpos($s['body'],$vurl['href']) === false) {
- $s['body'] .= "\n\n" . '[zmg]' . $vurl['href'] . '[/zmg]';
+ $s['body'] .= '[zmg]' . $vurl['href'] . '[/zmg]' . "\n\n" . $s['body'];
break;
}
}
}
elseif(is_string($act->obj['url'])) {
if(strpos($s['body'],$act->obj['url']) === false) {
- $s['body'] .= "\n\n" . '[zmg]' . $act->obj['url'] . '[/zmg]';
+ $s['body'] .= '[zmg]' . $act->obj['url'] . '[/zmg]' . "\n\n" . $s['body'];
}
}
}
@@ -2025,7 +2025,7 @@ class Activity {
}
$a = new ActivityStreams($n);
- logger($a->debug());
+ //logger($a->debug());
if(! $a->is_valid()) {
break;