diff options
author | Mario <mario@mariovavti.com> | 2024-02-01 13:25:40 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2024-02-01 13:25:40 +0000 |
commit | e89563eb4cbc3d4c8645992962affe930df24386 (patch) | |
tree | 8cdf8ee5195a426fca80eb4592fead81be1eaa19 /Zotlabs/Widget/Messages.php | |
parent | dd204ec34f473d7e0b133d35b08f3c4dc8d3ffef (diff) | |
download | volse-hubzilla-e89563eb4cbc3d4c8645992962affe930df24386.tar.gz volse-hubzilla-e89563eb4cbc3d4c8645992962affe930df24386.tar.bz2 volse-hubzilla-e89563eb4cbc3d4c8645992962affe930df24386.zip |
fix edgecase for notices and make mod hq backwards compatible
Diffstat (limited to 'Zotlabs/Widget/Messages.php')
-rw-r--r-- | Zotlabs/Widget/Messages.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Zotlabs/Widget/Messages.php b/Zotlabs/Widget/Messages.php index 1d8a3b1da..6e452735a 100644 --- a/Zotlabs/Widget/Messages.php +++ b/Zotlabs/Widget/Messages.php @@ -189,7 +189,7 @@ class Messages { $entries[$i]['summary'] = $summary; //$entries[$i]['b64mid'] = gen_link_id($item['mid']); $entries[$i]['b64mid'] = $item['uuid']; - $entries[$i]['href'] = z_root() . '/hq/' . gen_link_id($item['mid']); + $entries[$i]['href'] = z_root() . '/hq/' . $item['uuid']; $entries[$i]['icon'] = $icon; $entries[$i]['unseen_count'] = (($item['unseen_count']) ? $item['unseen_count'] : (($item['item_unseen']) ? ' ' : '')); $entries[$i]['unseen_class'] = (($item['item_unseen']) ? 'primary' : 'secondary'); @@ -293,8 +293,8 @@ class Messages { $entries[$i]['info'] = ''; $entries[$i]['created'] = datetime_convert('UTC', date_default_timezone_get(), $notice['created']); $entries[$i]['summary'] = $summary; - $entries[$i]['b64mid'] = (($notice['ntype'] & NOTIFY_INTRO) ? '' : basename($notice['link'])); - $entries[$i]['href'] = (($notice['ntype'] & NOTIFY_INTRO) ? $notice['link'] : z_root() . '/hq/' . basename($notice['link'])); + $entries[$i]['b64mid'] = (($notice['ntype'] & NOTIFY_INTRO) ? '' : ((str_contains($notice['hash'], '-')) ? $notice['hash'] : basename($notice['link']))); + $entries[$i]['href'] = (($notice['ntype'] & NOTIFY_INTRO) ? $notice['link'] : z_root() . '/hq/' . ((str_contains($notice['hash'], '-')) ? $notice['hash'] : basename($notice['link']))); $entries[$i]['icon'] = (($notice['ntype'] & NOTIFY_INTRO) ? '<i class="fa fa-user-plus"></i>' : ''); $i++; |