App: Fix opening chat by phone number (#3830)
This commit is contained in:
parent
a3aeab9ee8
commit
369b0ac9ce
@ -2496,12 +2496,11 @@ export async function fetchChatByPhoneNumber<T extends GlobalState>(global: T, p
|
||||
|
||||
global = getGlobal();
|
||||
global = updateChat(global, chat.id, chat);
|
||||
setGlobal(global);
|
||||
|
||||
if (user) {
|
||||
global = updateUser(global, user.id, user);
|
||||
setGlobal(global);
|
||||
}
|
||||
setGlobal(global);
|
||||
|
||||
return chat;
|
||||
}
|
||||
|
||||
@ -227,7 +227,7 @@ function onUpdateConnectionState<T extends GlobalState>(
|
||||
.map((messageList) => messageList.chatId)
|
||||
.filter((chatId) => {
|
||||
const chat = global.chats.byId[chatId];
|
||||
return isChatChannel(chat) || isChatSuperGroup(chat);
|
||||
return chat && (isChatChannel(chat) || isChatSuperGroup(chat));
|
||||
});
|
||||
if (connectionState === 'connectionStateReady' && channelStackIds.length) {
|
||||
unique(channelStackIds).forEach((chatId) => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user