From 92905c707dcd87de482d2c30bbff0c692235e26a Mon Sep 17 00:00:00 2001 From: Avinash Lingaloo Date: Fri, 13 May 2022 17:28:45 +0400 Subject: [PATCH] fix gm/dm --- app/actions/local/channel.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/actions/local/channel.ts b/app/actions/local/channel.ts index 665261f7aa..c9ffb893ab 100644 --- a/app/actions/local/channel.ts +++ b/app/actions/local/channel.ts @@ -506,10 +506,11 @@ export const updateDmGmDisplayName = async (serverUrl: string) => { const channels = await queryUserChannelsByTypes(database, currentUserId, ['G', 'D']).fetch(); const userIds = channels.reduce((acc: string[], ch) => { - const uid = getUserIdFromChannelName(currentUserId, ch.name); - if (uid) { + if (ch.name.includes('_')) { + const uid = getUserIdFromChannelName(currentUserId, ch.name); acc.push(uid); } + acc.push(ch.displayName); return acc; }, []);