Skip to content

Commit a8d4c6f

Browse files
authored
feat: added message from bot (#163)
1 parent e42dd98 commit a8d4c6f

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

apps/web-app/server/services/telegram/wasabi-bot.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,9 @@ async function handlePhoto(ctx: Context) {
149149
fileUrl = uploaded.fileUrl
150150
}
151151

152-
await ctx.api.forwardMessage(TELEGRAM_FILES_GROUP_ID, ctx.message.chat.id, ctx.message.message_id)
152+
// Forward messages with file to group
153+
const message = await ctx.reply(`Фото #${data.ticket.id} передано в службу поддержки.`)
154+
await ctx.api.forwardMessages(TELEGRAM_FILES_GROUP_ID, ctx.message.chat.id, [message.message_id, ctx.message.message_id])
153155

154156
await repository.ticket.createMessage({
155157
ticketId: data.ticket.id,
@@ -161,7 +163,6 @@ async function handlePhoto(ctx: Context) {
161163
})
162164

163165
logger.log('photo', data.user.id, ctx.message.from.id, ctx.message.caption, ctx.message.photo, downloadUrl)
164-
ctx.reply('Фото передано в службу поддержки.')
165166
}
166167

167168
async function handleVideo(ctx: Context) {

0 commit comments

Comments
 (0)