From 209d06a8f795282ddf370dff8228d2385004d05a Mon Sep 17 00:00:00 2001 From: Mario Date: Tue, 12 Nov 2019 10:11:58 +0000 Subject: better detection for who to send sys notifications (needs addons update) --- Zotlabs/Module/Sse.php | 2 ++ Zotlabs/Module/Sse_bs.php | 3 +++ 2 files changed, 5 insertions(+) diff --git a/Zotlabs/Module/Sse.php b/Zotlabs/Module/Sse.php index 97fee5f49..6f7e9543a 100644 --- a/Zotlabs/Module/Sse.php +++ b/Zotlabs/Module/Sse.php @@ -84,6 +84,7 @@ class Sse extends Controller { echo "\n\n"; del_xconfig(self::$ob_hash, 'sse', 'notifications'); + set_xconfig(self::$ob_hash, 'sse', 'timestamp', datetime_convert()); unset($result); } @@ -96,6 +97,7 @@ class Sse extends Controller { flush(); if(connection_status() != CONNECTION_NORMAL || connection_aborted()) { + del_xconfig(self::$ob_hash, 'sse', 'timestamp'); break; } diff --git a/Zotlabs/Module/Sse_bs.php b/Zotlabs/Module/Sse_bs.php index 672a6c5ef..c591a00bf 100644 --- a/Zotlabs/Module/Sse_bs.php +++ b/Zotlabs/Module/Sse_bs.php @@ -27,6 +27,9 @@ class Sse_bs extends Controller { self::$offset = 0; self::$xchans = ''; + if(self::$ob_hash) + set_xconfig(self::$ob_hash, 'sse', 'timestamp', datetime_convert()); + if(!empty($_GET['nquery']) && $_GET['nquery'] !== '%') { $nquery = $_GET['nquery']; -- cgit v1.2.3