Files
buzz-sheet/lib/notifications/events.ts
T
gunshiz 9bc710c94b
CI / Verify (push) Successful in 1m50s
CI / Build immutable images and deploy (push) Successful in 2m59s
feat : ask for noti
2026-10-08 02:23:59 +07:00

7 lines
345 B
TypeScript

import 'server-only';
import { getRedisClient, redisEventChannel } from '@/lib/redis/client';
export async function notifyNotificationChange(userId: string) {
try { await (await getRedisClient()).publish(redisEventChannel(`notifications:user:${userId}`), 'changed'); }
catch { /* Saved notifications remain available after reconnect. */ }
}