diff options
author | Mario Vavti <mario@mariovavti.com> | 2021-10-01 22:48:09 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2021-10-01 22:48:09 +0200 |
commit | 9346a06f350fc5bbb6bbed7ae49467ccc0f926c5 (patch) | |
tree | f51c8e24c34a8e783c612709a6397f2a9446c373 | |
parent | 250e917c6ea2a1904654f84aae50406e3d308147 (diff) | |
download | volse-hubzilla-9346a06f350fc5bbb6bbed7ae49467ccc0f926c5.tar.gz volse-hubzilla-9346a06f350fc5bbb6bbed7ae49467ccc0f926c5.tar.bz2 volse-hubzilla-9346a06f350fc5bbb6bbed7ae49467ccc0f926c5.zip |
also check for vnotify
-rw-r--r-- | Zotlabs/Module/Sse.php | 7 |
1 files changed, 5 insertions, 2 deletions
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; |