send "typing" notification to telegram when bot is thinking

This commit is contained in:
sysradium 2026-02-15 23:14:08 +01:00
parent ebd2538adc
commit c18e9a4fdc
No known key found for this signature in database

View file

@ -241,6 +241,8 @@ func (c *TelegramChannel) handleMessage(ctx context.Context, update telego.Updat
localFiles = append(localFiles, voicePath) localFiles = append(localFiles, voicePath)
mediaPaths = append(mediaPaths, voicePath) mediaPaths = append(mediaPaths, voicePath)
_ = c.bot.SendChatAction(ctx, tu.ChatAction(tu.ID(chatID), telego.ChatActionTyping))
transcribedText := "" transcribedText := ""
if c.transcriber != nil && c.transcriber.IsAvailable() { if c.transcriber != nil && c.transcriber.IsAvailable() {
ctx, cancel := context.WithTimeout(ctx, 30*time.Second) ctx, cancel := context.WithTimeout(ctx, 30*time.Second)