From fd4a2be361bd2162193656b04c8a27d4b9a51676 Mon Sep 17 00:00:00 2001 From: cha0s Date: Mon, 14 Dec 2020 14:08:56 -0600 Subject: [PATCH] fix: anon chans --- packages/chat/src/state.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/chat/src/state.js b/packages/chat/src/state.js index db181f4..2d4f378 100644 --- a/packages/chat/src/state.js +++ b/packages/chat/src/state.js @@ -56,8 +56,8 @@ export const channelState = async (req, latus, channel) => { export const channelsToHydrate = async (req, latus) => { const {channel, user} = req; - if (!user && channel) { - return channelIsAnonymous(channel) ? [channel] : []; + if (!user) { + return (channel && channelIsAnonymous(channel)) ? [channel] : []; } const {User} = ModelMap(latus); const channels = await Promise.all(