aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Sse.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2021-10-01 22:48:09 +0200
committerMario Vavti <mario@mariovavti.com>2021-10-01 22:48:09 +0200
commit9346a06f350fc5bbb6bbed7ae49467ccc0f926c5 (patch)
treef51c8e24c34a8e783c612709a6397f2a9446c373 /Zotlabs/Module/Sse.php
parent250e917c6ea2a1904654f84aae50406e3d308147 (diff)
downloadvolse-hubzilla-9346a06f350fc5bbb6bbed7ae49467ccc0f926c5.tar.gz
volse-hubzilla-9346a06f350fc5bbb6bbed7ae49467ccc0f926c5.tar.bz2
volse-hubzilla-9346a06f350fc5bbb6bbed7ae49467ccc0f926c5.zip
also check for vnotify
Diffstat (limited to 'Zotlabs/Module/Sse.php')
-rw-r--r--Zotlabs/Module/Sse.php7
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;