Return the MMS value as an ID for MMS messages.
This commit is contained in:
parent
e094ed3d0d
commit
bb692cced9
1 changed files with 3 additions and 2 deletions
|
|
@ -17,6 +17,7 @@ import (
|
|||
var VOIP_MS_API = "https://voip.ms/api/v1/rest.php"
|
||||
|
||||
type VoipMSResponse struct {
|
||||
MMS int `json:"mms"`
|
||||
Message string `json:"message"`
|
||||
Status string `json:"status"`
|
||||
SMS int `json:"sms"`
|
||||
|
|
@ -47,8 +48,8 @@ func sendTextVoipms(ctx context.Context, to string, content string, media ...str
|
|||
if err != nil {
|
||||
return "", fmt.Errorf("Failed to send MMS: %w", err)
|
||||
}
|
||||
log.Info().Str("status", response.Status).Int("sms", response.SMS).Msg("Sent MMS message")
|
||||
return strconv.Itoa(response.SMS), nil
|
||||
log.Info().Str("status", response.Status).Int("mms", response.MMS).Msg("Sent MMS message")
|
||||
return strconv.Itoa(response.MMS), nil
|
||||
}
|
||||
|
||||
func sendSMSVoipms(to string, content string) (string, error) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue