Browse Source

feat: add send file caption (#49)

pull/51/head v4.4.2
Aldino Kemal 3 years ago
committed by GitHub
parent
commit
3d5ffc96c3
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      src/domains/send/file.go
  2. 1
      src/services/send.go

1
src/domains/send/file.go

@ -5,6 +5,7 @@ import "mime/multipart"
type FileRequest struct {
Phone string `json:"phone" form:"phone"`
File *multipart.FileHeader `json:"file" form:"file"`
Caption string `json:"caption" form:"caption"`
}
type FileResponse struct {

1
src/services/send.go

@ -189,6 +189,7 @@ func (service serviceSend) SendFile(ctx context.Context, request domainSend.File
FileName: proto.String(request.File.Filename),
FileEncSha256: uploadedFile.FileEncSHA256,
DirectPath: proto.String(uploadedFile.DirectPath),
Caption: proto.String(request.Caption),
}}
ts, err := service.WaCli.SendMessage(ctx, dataWaRecipient, msgId, msg)
go func() {

Loading…
Cancel
Save