From 0a54efefaba43997efd5f73831ff7f77b9e6894b Mon Sep 17 00:00:00 2001 From: n9k Date: Sun, 24 Jul 2022 01:26:18 +0000 Subject: [PATCH] Bugfix: absent broadcaster with js stuck in refresh loop Fixed by not setting user['verified'] to None for the broadcaster. --- anonstream/tasks.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/anonstream/tasks.py b/anonstream/tasks.py index 63c1c55..4902f92 100644 --- a/anonstream/tasks.py +++ b/anonstream/tasks.py @@ -64,8 +64,11 @@ async def t_sunset_users(timestamp, iteration): if iteration == 0: return - # De-access absent users - absent_users = tuple(get_absent_users(timestamp)) + # Revoke access for absent users (except the broadcaster) + absent_users = tuple(filter( + lambda user: not user['broadcaster'], + get_absent_users(timestamp) + )) for user in absent_users: user['verified'] = None # Absent users should have no connected websockets,