fix docker for tauri app
This commit is contained in:
@@ -36,9 +36,9 @@ export class BotController {
|
||||
|
||||
@Get('by-username/:botRef/messages')
|
||||
@ApiOperation({ summary: 'История чата с ботом', description: 'Возвращает сообщения пользователя с ботом в хронологическом порядке.' })
|
||||
listBotMessages(@Headers('authorization') authorization: string | undefined, @Param('botRef') botRef: string) {
|
||||
listBotMessages(@Headers('authorization') authorization: string | undefined, @Param('botRef') botRef: string, @Query('roomId') roomId?: string) {
|
||||
return this.auth(authorization).then((userId) =>
|
||||
firstValueFrom(this.core.bot.ListBotChatMessages({ userId, botRef }))
|
||||
firstValueFrom(this.core.bot.ListBotChatMessages({ userId, botRef, roomId }))
|
||||
);
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ export class BotController {
|
||||
@Body() dto: SubmitBotMessageDto
|
||||
) {
|
||||
return this.auth(authorization).then((senderUserId) =>
|
||||
firstValueFrom(this.core.bot.SubmitBotInboundMessage({ senderUserId, botRef, text: dto.text }))
|
||||
firstValueFrom(this.core.bot.SubmitBotInboundMessage({ senderUserId, botRef, text: dto.text, roomId: dto.roomId }))
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -91,6 +91,10 @@ export class SubmitBotMessageDto {
|
||||
@IsString()
|
||||
@MinLength(1, { message: 'Текст сообщения не может быть пустым' })
|
||||
text!: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
roomId?: string;
|
||||
}
|
||||
|
||||
export class SubmitBotCallbackDto {
|
||||
|
||||
Reference in New Issue
Block a user