Infer attachment type from file mime type and change endpoint accordingly.
This commit is contained in:
parent
6af2d4a1ea
commit
5cfd51fdb6
3 changed files with 9 additions and 5 deletions
2
app.js
2
app.js
|
|
@ -290,6 +290,8 @@ async function sendMessage() {
|
|||
async function sendFileMessage(file) {
|
||||
try {
|
||||
const result = await waha.sendFileMessage(activeChatState.id, file);
|
||||
console.log(result)
|
||||
// ui.appendSingleMessage(result, activeChatState.name, userInfo.id, activeChatState.id);
|
||||
} catch (error) {
|
||||
console.error(error.message);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue