7 lines
345 B
TypeScript
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. */ }
|
|
}
|