Fix update own DM display name
This commit is contained in:
parent
d1c9c98900
commit
fe5b034915
1 changed files with 2 additions and 1 deletions
|
|
@ -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<Promise<Model[]>> = [];
|
||||
if (users.length) {
|
||||
if (updatedChannelsArray.length) {
|
||||
modelPromises.push(operator.handleChannel({channels: updatedChannelsArray, prepareRecordsOnly: true}));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue