2026-01-25 18:47:22 +00:00
|
|
|
package text
|
2026-01-21 03:30:03 +00:00
|
|
|
|
|
|
|
|
import (
|
2026-01-25 18:47:22 +00:00
|
|
|
"context"
|
2026-01-21 03:30:03 +00:00
|
|
|
"fmt"
|
|
|
|
|
|
|
|
|
|
"github.com/Gleipnir-Technology/nidus-sync/config"
|
|
|
|
|
)
|
|
|
|
|
|
2026-01-27 14:29:55 +00:00
|
|
|
func SendText(ctx context.Context, source string, destination string, message string) (string, error) {
|
2026-01-29 21:53:49 +00:00
|
|
|
switch config.TextProvider {
|
|
|
|
|
case "voipms":
|
|
|
|
|
return sendTextVoipms(ctx, destination, message)
|
|
|
|
|
case "twilio":
|
|
|
|
|
return sendTextTwilio(ctx, source, destination, message)
|
2026-01-21 03:30:03 +00:00
|
|
|
}
|
2026-01-29 21:53:49 +00:00
|
|
|
return "", fmt.Errorf("Unsupported provider '%s'", config.TextProvider)
|
2026-01-21 03:30:03 +00:00
|
|
|
}
|