fix docker for tauri app
This commit is contained in:
@@ -46,6 +46,7 @@ interface FamilyBotChatProps {
|
||||
botRef: string;
|
||||
botName: string;
|
||||
token: string | null;
|
||||
roomId?: string;
|
||||
className?: string;
|
||||
inputPlaceholder?: string;
|
||||
onOpenMiniApp?: (url: string) => void;
|
||||
@@ -56,6 +57,7 @@ export function FamilyBotChat({
|
||||
botRef,
|
||||
botName,
|
||||
token,
|
||||
roomId,
|
||||
className,
|
||||
inputPlaceholder = 'Сообщение боту',
|
||||
onOpenMiniApp,
|
||||
@@ -98,7 +100,7 @@ export function FamilyBotChat({
|
||||
if (!token) return;
|
||||
setLoading(true);
|
||||
try {
|
||||
const response = await fetchBotChatMessages(botRef, token);
|
||||
const response = await fetchBotChatMessages(botRef, token, roomId);
|
||||
setMessages(response.messages ?? []);
|
||||
const menuButton = resolveComposerMenuButton({
|
||||
composerMenuButtonJson: response.composerMenuButtonJson,
|
||||
@@ -119,7 +121,7 @@ export function FamilyBotChat({
|
||||
} finally {
|
||||
setLoading(false);
|
||||
}
|
||||
}, [botRef, onBotMetaChange, token]);
|
||||
}, [botRef, onBotMetaChange, roomId, token]);
|
||||
|
||||
useEffect(() => {
|
||||
void loadMessages();
|
||||
@@ -240,7 +242,7 @@ export function FamilyBotChat({
|
||||
}
|
||||
]);
|
||||
try {
|
||||
await sendBotMessage(botRef, text, token);
|
||||
await sendBotMessage(botRef, text, token, roomId);
|
||||
await loadMessages();
|
||||
} finally {
|
||||
setSending(false);
|
||||
|
||||
Reference in New Issue
Block a user