fix mini app bot father

This commit is contained in:
lendry
2026-06-26 11:18:07 +03:00
parent 7ed7cbdd16
commit d3ea470d02
12 changed files with 313 additions and 39 deletions

View File

@@ -394,7 +394,10 @@ export function MiniFamilyChat() {
exitSelectionMode();
showToast(ids.length === 1 ? 'Сообщение удалено' : 'Сообщения удалены');
} catch (error) {
if (activeRoom) {
if (view === 'bot' && activeBot) {
const response = await fetchBotChatMessages(activeBot.botRef, token);
setBotMessages(response.messages ?? []);
} else if (activeRoom && activeRoom.type !== 'BOT') {
const response = await fetchChatMessages(activeRoom.id, token);
setMessages((response.messages ?? []).filter((message) => !message.isDeleted));
}