aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs')
-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;