Files
snek/src
retoor 58cb9c7b39 feat: add online status tracking via last_ping field and ping RPC method
Introduce a `last_ping` string field on the UserModel to store the timestamp of the user's last activity. Implement `get_online_users` in ChannelService that filters channel members whose `last_ping` is within the last 30 seconds. Add a `ping` RPC endpoint that updates the user's `last_ping` to the current server time. On the client side, emit a "connected" event on WebSocket open, trigger an immediate "online" ping, and schedule a recurring "active" ping every 15 seconds to maintain the online status.
2025-02-10 15:18:08 +00:00
..