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. */ } }