diff --git a/src/services/send_service_impl.go b/src/services/send_service_impl.go index fdd9902..cb85e12 100644 --- a/src/services/send_service_impl.go +++ b/src/services/send_service_impl.go @@ -192,6 +192,7 @@ func (service SendServiceImpl) SendVideo(c *fiber.Ctx, request structs.SendVideo FileEncSha256: uploadedFile.FileEncSHA256, MediaKey: uploadedFile.MediaKey, DirectPath: proto.String(uploadedFile.DirectPath), + ViewOnce: proto.Bool(request.ViewOnce), }} ts, err := service.WaCli.SendMessage(dataWaRecipient, "", msg) go func() { diff --git a/src/structs/send_struct.go b/src/structs/send_struct.go index b57b11b..d283d60 100644 --- a/src/structs/send_struct.go +++ b/src/structs/send_struct.go @@ -42,10 +42,11 @@ type SendFileResponse struct { } type SendVideoRequest struct { - Phone string `json:"phone" form:"phone"` - Caption string `json:"caption" form:"caption"` - Video *multipart.FileHeader `json:"video" form:"video"` - Type SendType `json:"type" form:"message"` + Phone string `json:"phone" form:"phone"` + Caption string `json:"caption" form:"caption"` + Video *multipart.FileHeader `json:"video" form:"video"` + Type SendType `json:"type" form:"message"` + ViewOnce bool `json:"view_once" form:"view_once"` } type SendVideoResponse struct {