diff options
author | Mario <mario@mariovavti.com> | 2024-07-20 13:09:05 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2024-07-20 13:09:05 +0000 |
commit | c5bca0279c82f7f86e73d0ceb5fe49347d6e2fa7 (patch) | |
tree | 0dfb1389970a39e3d00239d595c3d62c3fae5c54 /Zotlabs | |
parent | 3fca63a15f50743952ce87672974145a0c2b4abb (diff) | |
download | volse-hubzilla-c5bca0279c82f7f86e73d0ceb5fe49347d6e2fa7.tar.gz volse-hubzilla-c5bca0279c82f7f86e73d0ceb5fe49347d6e2fa7.tar.bz2 volse-hubzilla-c5bca0279c82f7f86e73d0ceb5fe49347d6e2fa7.zip |
Revert "Revert "sse: reset session after connection aborted""
This reverts commit c71eb401c04c5ae2e5388f988825b072f3c113df
Diffstat (limited to 'Zotlabs')
-rw-r--r-- | Zotlabs/Module/Sse.php | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Zotlabs/Module/Sse.php b/Zotlabs/Module/Sse.php index a5b5c7e35..daf344f2d 100644 --- a/Zotlabs/Module/Sse.php +++ b/Zotlabs/Module/Sse.php @@ -41,8 +41,6 @@ class Sse extends Controller { } } - - if (self::$uid) { self::$vnotify = get_pconfig(self::$uid, 'system', 'vnotify'); } @@ -138,8 +136,17 @@ class Sse extends Controller { } if (connection_status() != CONNECTION_NORMAL || connection_aborted()) { + + // IMPORTANT: in case the channel was changed we need to reset the + // session here to it's current stored state. + // Otherwise the uid might switch back to the previous value + // in the background. + + session_reset(); + XConfig::Set(self::$ob_hash, 'sse', 'timestamp', NULL_DATE); XConfig::Set(self::$ob_hash, 'sse', 'notifications', []); + $_SESSION['sysmsg'] = []; $_SESSION['sysmsg_info'] = []; |