import { Response } from 'express'; import { touchAppPresence } from '../realtime/redis/onlinePresence'; import type { AuthRequest } from '../middleware/auth'; /** Lightweight heartbeat so idle browsers stay in the app presence set. */ export async function pingPresence(req: AuthRequest, res: Response): Promise { const userId = req.user?.userId; if (userId) await touchAppPresence(userId); res.json({ ok: true }); }