From fe5b0349153455c3af0c4f72c260c1e20e898270 Mon Sep 17 00:00:00 2001 From: Elias Nahum Date: Tue, 24 May 2022 17:38:12 -0400 Subject: [PATCH] Fix update own DM display name --- app/actions/remote/channel.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/actions/remote/channel.ts b/app/actions/remote/channel.ts index 8e71b361b..97b6db09d 100644 --- a/app/actions/remote/channel.ts +++ b/app/actions/remote/channel.ts @@ -480,6 +480,7 @@ export async function fetchMissingDirectChannelsInfo(serverUrl: string, directCh const ownDirectChannel = dms.find((dm) => dm.name === getDirectChannelName(currentUserId, currentUserId)); if (ownDirectChannel) { ownDirectChannel.display_name = displayUsername(currentUser, locale, teammateDisplayNameSetting, false); + updatedChannels.add(ownDirectChannel); } } } @@ -487,7 +488,7 @@ export async function fetchMissingDirectChannelsInfo(serverUrl: string, directCh const updatedChannelsArray = Array.from(updatedChannels); if (!fetchOnly) { const modelPromises: Array> = []; - if (users.length) { + if (updatedChannelsArray.length) { modelPromises.push(operator.handleChannel({channels: updatedChannelsArray, prepareRecordsOnly: true})); }