Skip to content

Commit 7687af3

Browse files
committed
set file name when uploading
1 parent 9b26641 commit 7687af3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

messages/session_manager.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88
"io/ioutil"
99
"mime"
1010
"os"
11+
"path/filepath"
1112
"strings"
1213
"time"
1314

@@ -350,8 +351,8 @@ func (sm *SessionManager) execCommand(command Command) {
350351
Info: whatsapp.MessageInfo{
351352
RemoteJid: sm.currentReceiver,
352353
},
353-
Type: mime.String(),
354-
Content: file,
354+
Type: mime.String(),
355+
FileName: filepath.Base(file.Name()),
355356
}
356357
wac := sm.getConnection()
357358
sm.lastSent = time.Now()

0 commit comments

Comments
 (0)