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 = getGlobal();
|
||||||
global = updateChat(global, chat.id, chat);
|
global = updateChat(global, chat.id, chat);
|
||||||
setGlobal(global);
|
|
||||||
|
|
||||||
if (user) {
|
if (user) {
|
||||||
global = updateUser(global, user.id, user);
|
global = updateUser(global, user.id, user);
|
||||||
setGlobal(global);
|
|
||||||
}
|
}
|
||||||
|
setGlobal(global);
|
||||||
|
|
||||||
return chat;
|
return chat;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -227,7 +227,7 @@ function onUpdateConnectionState<T extends GlobalState>(
|
|||||||
.map((messageList) => messageList.chatId)
|
.map((messageList) => messageList.chatId)
|
||||||
.filter((chatId) => {
|
.filter((chatId) => {
|
||||||
const chat = global.chats.byId[chatId];
|
const chat = global.chats.byId[chatId];
|
||||||
return isChatChannel(chat) || isChatSuperGroup(chat);
|
return chat && (isChatChannel(chat) || isChatSuperGroup(chat));
|
||||||
});
|
});
|
||||||
if (connectionState === 'connectionStateReady' && channelStackIds.length) {
|
if (connectionState === 'connectionStateReady' && channelStackIds.length) {
|
||||||
unique(channelStackIds).forEach((chatId) => {
|
unique(channelStackIds).forEach((chatId) => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user