chore: refresh gramsrv public release
This commit is contained in:
parent
75cebe8dbf
commit
70b6820474
1274 changed files with 378751 additions and 59919 deletions
27
internal/app/messages/business_ai_echo.go
Normal file
27
internal/app/messages/business_ai_echo.go
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
package messages
|
||||
|
||||
import (
|
||||
"context"
|
||||
"strings"
|
||||
|
||||
"telesrv/internal/domain"
|
||||
)
|
||||
|
||||
type EchoBusinessAutomationProvider struct{}
|
||||
|
||||
func NewEchoBusinessAutomationProvider() EchoBusinessAutomationProvider {
|
||||
return EchoBusinessAutomationProvider{}
|
||||
}
|
||||
|
||||
func (EchoBusinessAutomationProvider) BusinessAutomationReplies(_ context.Context, input BusinessAutomationReplyInput) ([]domain.QuickReplyMessage, error) {
|
||||
body := input.TriggerMessage.Body
|
||||
if strings.TrimSpace(body) == "" {
|
||||
return nil, nil
|
||||
}
|
||||
return []domain.QuickReplyMessage{{
|
||||
ID: 1,
|
||||
Date: input.Now,
|
||||
Message: body,
|
||||
Entities: append([]domain.MessageEntity(nil), input.TriggerMessage.Entities...),
|
||||
}}, nil
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue