diff options
author | Mario <mario@mariovavti.com> | 2025-04-03 17:15:22 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2025-04-03 17:15:22 +0000 |
commit | e62c4e6088d04ced410c86343a5153de0f1baedd (patch) | |
tree | 5188460f5c30468f515d05b07ce00eeba105204a /Zotlabs | |
parent | 703ccc2a9a1cb5e6be204b2b30da90011347dc0d (diff) | |
download | volse-hubzilla-e62c4e6088d04ced410c86343a5153de0f1baedd.tar.gz volse-hubzilla-e62c4e6088d04ced410c86343a5153de0f1baedd.tar.bz2 volse-hubzilla-e62c4e6088d04ced410c86343a5153de0f1baedd.zip |
some emoji type tags do not have an id, we will use icon.url instead in those cases
Diffstat (limited to 'Zotlabs')
-rw-r--r-- | Zotlabs/Lib/Activity.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php index 5d6868d66..84b1cb4a2 100644 --- a/Zotlabs/Lib/Activity.php +++ b/Zotlabs/Lib/Activity.php @@ -695,7 +695,7 @@ class Activity { if (is_array($t) && !array_key_exists('type', $t)) $t['type'] = 'Hashtag'; - if (is_array($t) && (array_key_exists('href', $t) || array_key_exists('id', $t)) && array_key_exists('name', $t)) { + if (is_array($t) && (array_key_exists('href', $t) || array_key_exists('id', $t) || isset($t['icon']['url'])) && array_key_exists('name', $t)) { 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'])]; @@ -710,7 +710,7 @@ class Activity { break; case 'Emoji': - $ret[] = ['ttype' => TERM_EMOJI, 'url' => $t['id'], 'term' => escape_tags($t['name']), 'imgurl' => $t['icon']['url']]; + $ret[] = ['ttype' => TERM_EMOJI, 'url' => $t['id'] ?? $t['icon']['url'], 'term' => escape_tags($t['name']), 'imgurl' => $t['icon']['url']]; break; default: |