forked from retoor/snek
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.