From 9346a06f350fc5bbb6bbed7ae49467ccc0f926c5 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Fri, 1 Oct 2021 22:48:09 +0200 Subject: also check for vnotify --- Zotlabs/Module/Sse.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'Zotlabs') diff --git a/Zotlabs/Module/Sse.php b/Zotlabs/Module/Sse.php index 581680a68..3dab3d465 100644 --- a/Zotlabs/Module/Sse.php +++ b/Zotlabs/Module/Sse.php @@ -34,6 +34,7 @@ class Sse extends Controller { self::$uid = local_channel(); self::$ob_hash = get_observer_hash(); self::$sse_id = false; + self::$vnotify = -1; if(! self::$ob_hash) { if(session_id()) { @@ -45,7 +46,9 @@ class Sse extends Controller { } } - self::$vnotify = get_pconfig(self::$uid, 'system', 'vnotify'); + if (self::$uid) { + self::$vnotify = get_pconfig(self::$uid, 'system', 'vnotify'); + } $sleep_seconds = 3; @@ -96,7 +99,7 @@ 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 && !Apps::system_app_installed(self::$uid, 'Public Stream')) { + 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; -- cgit v1.2.3