diff options
author | Mario <mario@mariovavti.com> | 2021-03-05 08:15:41 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2021-03-05 09:26:30 +0100 |
commit | 7d03ff20436476fbbfe0f61fa9001c6cf2b392d4 (patch) | |
tree | 28a8f55deb8397a78fa864485c7e7c536657f61c | |
parent | 00ccafc90dbf0aebe56df723e883f89a45b9adea (diff) | |
download | volse-hubzilla-7d03ff20436476fbbfe0f61fa9001c6cf2b392d4.tar.gz volse-hubzilla-7d03ff20436476fbbfe0f61fa9001c6cf2b392d4.tar.bz2 volse-hubzilla-7d03ff20436476fbbfe0f61fa9001c6cf2b392d4.zip |
sse_bs: if Enotify::format() returns an empty array do not add it to notifications (the item has probably been blocked)
(cherry picked from commit 1da494a2a5108eaf07821d30cea23564ceaa9506)
-rw-r--r-- | CHANGELOG | 3 | ||||
-rw-r--r-- | Zotlabs/Module/Sse_bs.php | 25 |
2 files changed, 22 insertions, 6 deletions
@@ -3,6 +3,7 @@ Hubzilla 5.4 (2021-03-xx) - group_add() return group hash to save a lookup - Do not poll feeds if feed contacts setting is disabled - Deprecate sticky_kit library in favor of CSS position sticky solution + - Trigger endless scroll loading at the end of content instead of end of window height - Implement experimental zap export compatibility - Deprecate the [summary] tag in favor of a separate input field for the summary - Adjust error reporting for PHP8 @@ -14,7 +15,7 @@ Hubzilla 5.4 (2021-03-xx) - Introduce fetch_provider hook - Implement ActivityStreams discovery in mod profile - Implement ActivityStreams discovery in mod channel - - Update OS folder and file permissions + - Streamline OS folder and file permissions - Implement ThreadListener in mod activity_match - Improve ThreadListener handling - Use mail envelope instead of lock icon for direct messages diff --git a/Zotlabs/Module/Sse_bs.php b/Zotlabs/Module/Sse_bs.php index 396e07001..3b39d5b49 100644 --- a/Zotlabs/Module/Sse_bs.php +++ b/Zotlabs/Module/Sse_bs.php @@ -181,7 +181,10 @@ class Sse_bs extends Controller { $result['network']['offset'] = ((count($items) == $limit) ? intval($offset + $limit) : -1); xchan_query($items); foreach($items as $item) { - $result['network']['notifications'][] = Enotify::format($item); + $parsed = Enotify::format($item); + if($parsed) { + $result['network']['notifications'][] = $parsed; + } } } else { @@ -250,7 +253,10 @@ class Sse_bs extends Controller { $result['dm']['offset'] = ((count($items) == $limit) ? intval($offset + $limit) : -1); xchan_query($items); foreach($items as $item) { - $result['dm']['notifications'][] = Enotify::format($item); + $parsed = Enotify::format($item); + if($parsed) { + $result['dm']['notifications'][] = $parsed; + } } } else { @@ -319,7 +325,10 @@ class Sse_bs extends Controller { $result['home']['offset'] = ((count($items) == $limit) ? intval($offset + $limit) : -1); xchan_query($items); foreach($items as $item) { - $result['home']['notifications'][] = Enotify::format($item); + $parsed = Enotify::format($item); + if($parsed) { + $result['home']['notifications'][] = $parsed; + } } } else { @@ -400,7 +409,10 @@ class Sse_bs extends Controller { $result['pubs']['offset'] = ((count($items) == $limit) ? intval($offset + $limit) : -1); xchan_query($items); foreach($items as $item) { - $result['pubs']['notifications'][] = Enotify::format($item); + $parsed = Enotify::format($item); + if($parsed) { + $result['pubs']['notifications'][] = $parsed; + } } } else { @@ -592,7 +604,10 @@ class Sse_bs extends Controller { if($r) { xchan_query($r); foreach($r as $rr) { - $result['files']['notifications'][] = Enotify::format($rr); + $parsed = Enotify::format($rr); + if($parsed) { + $result['files']['notifications'][] = $parsed; + } } $result['files']['count'] = count($r); } |