From 1e4718eae1c9ce647a34ed13d43d8a0bbe7c42af Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Thu, 24 Nov 2022 16:42:09 +0100 Subject: do not always trigger a sse event if pubs notification are off or the app is not installed for the channel --- Zotlabs/Module/Sse.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Zotlabs/Module/Sse.php') diff --git a/Zotlabs/Module/Sse.php b/Zotlabs/Module/Sse.php index 3dab3d465..f87a19821 100644 --- a/Zotlabs/Module/Sse.php +++ b/Zotlabs/Module/Sse.php @@ -100,9 +100,9 @@ class Sse extends Controller { // We do not have the local_channel in the addon. // Reset pubs here if the app is not installed. if (self::$uid && (!(self::$vnotify & VNOTIFY_PUBS) || !Apps::system_app_installed(self::$uid, 'Public Stream'))) { - $result['pubs']['count'] = 0; - $result['pubs']['notifications'] = []; - $result['pubs']['offset'] = -1; + if (isset($result['pubs'])) { + unset($result['pubs']); + } } if($result && !$lock) { -- cgit v1.2.3