aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs/Module')
-rw-r--r--Zotlabs/Module/Invite.php13
-rw-r--r--Zotlabs/Module/Pubstream.php11
-rw-r--r--Zotlabs/Module/Sse.php6
3 files changed, 21 insertions, 9 deletions
diff --git a/Zotlabs/Module/Invite.php b/Zotlabs/Module/Invite.php
index 2a126ac27..bb552e4c7 100644
--- a/Zotlabs/Module/Invite.php
+++ b/Zotlabs/Module/Invite.php
@@ -43,6 +43,19 @@ class Invite extends Controller {
const MYP = 'ZAI';
const VERSION = '2.0.0';
+ function init() {
+
+ if (!local_channel()) {
+ return;
+ }
+
+ $channel = App::get_channel();
+ if ($channel) {
+ profile_load($channel['channel_address']);
+ }
+
+ }
+
function post() {
// zai02
diff --git a/Zotlabs/Module/Pubstream.php b/Zotlabs/Module/Pubstream.php
index 3c8dfa0a5..47da3c13a 100644
--- a/Zotlabs/Module/Pubstream.php
+++ b/Zotlabs/Module/Pubstream.php
@@ -12,6 +12,7 @@ class Pubstream extends \Zotlabs\Web\Controller {
function get($update = 0, $load = false) {
+
if(local_channel()) {
if(! Apps::system_app_installed(local_channel(), 'Public Stream')) {
//Do not display any associated widgets at this point
@@ -31,16 +32,13 @@ class Pubstream extends \Zotlabs\Web\Controller {
}
}
- $site_firehose = ((intval(get_config('system','site_firehose',0))) ? true : false);
$net_firehose = ((get_config('system','disable_discover_tab',1)) ? false : true);
- if(! ($site_firehose || $net_firehose)) {
+ if(!$net_firehose) {
return '';
}
- if($net_firehose) {
- $site_firehose = false;
- }
+ $site_firehose = ((intval(get_config('system','site_firehose',0))) ? true : false);
$mid = ((x($_REQUEST, 'mid')) ? unpack_link_id($_REQUEST['mid']) : '');
if ($mid === false) {
@@ -161,13 +159,14 @@ class Pubstream extends \Zotlabs\Web\Controller {
$sys = get_sys_channel();
$abook_uids = " and abook.abook_channel = " . intval($sys['channel_id']) . " ";
+ $sql_extra = '';
if($site_firehose) {
$uids = " and item.uid in ( " . stream_perms_api_uids(PERMS_PUBLIC) . " ) and item_private = 0 and item_wall = 1 ";
}
else {
$uids = " and item.uid = " . intval($sys['channel_id']) . " ";
- $sql_extra = item_permissions_sql($sys['channel_id']);
+ $sql_extra .= item_permissions_sql($sys['channel_id']);
\App::$data['firehose'] = intval($sys['channel_id']);
}
diff --git a/Zotlabs/Module/Sse.php b/Zotlabs/Module/Sse.php
index 3dab3d465..f87a19821 100644
--- a/Zotlabs/Module/Sse.php
+++ b/Zotlabs/Module/Sse.php
@@ -100,9 +100,9 @@ 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 && (!(self::$vnotify & VNOTIFY_PUBS) || !Apps::system_app_installed(self::$uid, 'Public Stream'))) {
- $result['pubs']['count'] = 0;
- $result['pubs']['notifications'] = [];
- $result['pubs']['offset'] = -1;
+ if (isset($result['pubs'])) {
+ unset($result['pubs']);
+ }
}
if($result && !$lock) {