Small refacroting of arg positions
This commit is contained in:
@@ -184,7 +184,7 @@ func (c *TelegramController) handleAudioMessage(message *tgbotapi.Message) {
|
||||
c.send(successMsg)
|
||||
|
||||
// Отправляем результат расшифровки (асинхронно)
|
||||
go c.sendTranscriptionResult(message.Chat.ID, job.Id, sentProgressMsg.MessageID)
|
||||
go c.sendTranscriptionResult(job.Id, message.Chat.ID, sentProgressMsg.MessageID)
|
||||
}
|
||||
|
||||
func (c *TelegramController) handleVoiceMessage(message *tgbotapi.Message) {
|
||||
@@ -222,7 +222,7 @@ func (c *TelegramController) handleVoiceMessage(message *tgbotapi.Message) {
|
||||
c.send(successMsg)
|
||||
|
||||
// Отправляем результат расшифровки (асинхронно)
|
||||
go c.sendTranscriptionResult(message.Chat.ID, job.Id, sentProgressMsg.MessageID)
|
||||
go c.sendTranscriptionResult(job.Id, message.Chat.ID, sentProgressMsg.MessageID)
|
||||
}
|
||||
|
||||
func (c *TelegramController) handleDocumentMessage(message *tgbotapi.Message) {
|
||||
@@ -265,7 +265,7 @@ func (c *TelegramController) handleDocumentMessage(message *tgbotapi.Message) {
|
||||
c.send(successMsg)
|
||||
|
||||
// Отправляем результат расшифровки (асинхронно)
|
||||
go c.sendTranscriptionResult(message.Chat.ID, job.Id, sentProgressMsg.MessageID)
|
||||
go c.sendTranscriptionResult(job.Id, message.Chat.ID, sentProgressMsg.MessageID)
|
||||
}
|
||||
|
||||
func (c *TelegramController) downloadAudioFile(fileID string) (io.ReadCloser, string, error) {
|
||||
@@ -291,7 +291,7 @@ func (c *TelegramController) downloadAudioFile(fileID string) (io.ReadCloser, st
|
||||
return resp.Body, fileName, nil
|
||||
}
|
||||
|
||||
func (c *TelegramController) sendTranscriptionResult(chatID int64, jobID string, progressMessageID int) {
|
||||
func (c *TelegramController) sendTranscriptionResult(jobID string, chatID int64, progressMessageID int) {
|
||||
// Периодически проверяем статус задачи
|
||||
ticker := time.NewTicker(5 * time.Second)
|
||||
defer ticker.Stop()
|
||||
|
Reference in New Issue
Block a user