aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Sse.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2021-10-01 22:44:26 +0200
committerMario Vavti <mario@mariovavti.com>2021-10-01 22:44:26 +0200
commit250e917c6ea2a1904654f84aae50406e3d308147 (patch)
tree6ae41cc5f1f5b502d04d8b495849af7a30dcbc5f /Zotlabs/Module/Sse.php
parent7b1cd37cd644a67d14764b63c1cfcebac9fd85ba (diff)
downloadvolse-hubzilla-250e917c6ea2a1904654f84aae50406e3d308147.tar.gz
volse-hubzilla-250e917c6ea2a1904654f84aae50406e3d308147.tar.bz2
volse-hubzilla-250e917c6ea2a1904654f84aae50406e3d308147.zip
only show sse pubs if the app is installed
Diffstat (limited to 'Zotlabs/Module/Sse.php')
-rw-r--r--Zotlabs/Module/Sse.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/Zotlabs/Module/Sse.php b/Zotlabs/Module/Sse.php
index 6f3df299f..581680a68 100644
--- a/Zotlabs/Module/Sse.php
+++ b/Zotlabs/Module/Sse.php
@@ -94,6 +94,14 @@ class Sse extends Controller {
$result = XConfig::Get(self::$ob_hash, 'sse', 'notifications', []);
$lock = XConfig::Get(self::$ob_hash, 'sse', 'lock');
+ // 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')) {
+ $result['pubs']['count'] = 0;
+ $result['pubs']['notifications'] = [];
+ $result['pubs']['offset'] = -1;
+ }
+
if($result && !$lock) {
echo "event: notifications\n";
echo 'data: ' . json_encode($result);