Skip to content

Commit d9cc41a

Browse files
committed
connector: re-request media when no URL present in current message
1 parent 22e6027 commit d9cc41a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/connector/directmedia.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ func (wa *WhatsAppConnector) downloadMessageDirectMedia(ctx context.Context, par
170170
return &mediaproxy.GetMediaResponseFile{
171171
Callback: func(f *os.File) error {
172172
err := waClient.Client.DownloadToFile(ctx, keys, f)
173-
if errors.Is(err, whatsmeow.ErrMediaDownloadFailedWith403) || errors.Is(err, whatsmeow.ErrMediaDownloadFailedWith404) || errors.Is(err, whatsmeow.ErrMediaDownloadFailedWith410) {
173+
if errors.Is(err, whatsmeow.ErrMediaDownloadFailedWith403) || errors.Is(err, whatsmeow.ErrMediaDownloadFailedWith404) || errors.Is(err, whatsmeow.ErrMediaDownloadFailedWith410) || errors.Is(err, whatsmeow.ErrNoURLPresent) {
174174
val := params["fi.mau.whatsapp.reload_media"]
175175
if val == "false" || (!wa.Config.DirectMediaAutoRequest && val != "true") {
176176
return ErrReloadNeeded

0 commit comments

Comments
 (0)