anonstream/anonstream/routes
n9k 886c360e26 Tell websockets which users are watching
This adds a field 'watching' in `user_for_websocket` that's True iff WATCHING,
False iff NOTWATCHING, and None otherwise (since clients don't need to know if
a user is tentative or absent). When the value of this field changes for any
user, they get added to the update buffer (like with any other change).

Removed race condition in `t_sunset_users`: `broadcast_users_update` was being
called *after* a user was removed from memory (and for each user being removed,
which was redundant). In that scenario if there's a user in the update buffer
and `t_sunset_users` wins the race between it and `t_broadcast_users_update`,
then when `t_sunset_users` calls `broadcast_users_update` a KeyError would be
raised since the user's already been removed.

Fixed unintended behaviour of `t_sunset_users`: it was removing users based on
the result of `is_visible`, so users who were actually tenative (as opposed to
absent) were being removed.
2022-02-27 14:35:26 +13:00
..
__init__.py Nojs chat, store all user names/colors in js, forget about inactive users 2022-02-17 13:30:05 +13:00
core.py Segment streaming redux, accurate stream uptime 2022-02-23 15:57:04 +13:00
nojs.py Tell websockets which users are watching 2022-02-27 14:35:26 +13:00
websocket.py Captchas, require captcha initially, generalize notices to states 2022-02-22 16:25:43 +13:00
wrappers.py Tell websockets which users are watching 2022-02-27 14:35:26 +13:00