send "typing" notification to telegram when bot is thinking
This commit is contained in:
parent
ebd2538adc
commit
c18e9a4fdc
1 changed files with 2 additions and 0 deletions
|
|
@ -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)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue