Skip to content

Commit

Permalink
feat: Added support to send mentionedList in images (#2172)
Browse files Browse the repository at this point in the history
  • Loading branch information
megustalol committed May 9, 2024
1 parent 1d7fe88 commit 8fa8f9d
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions src/api/layers/sender.layer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,14 +234,16 @@ export class SenderLayer extends ListenerLayer {
* @param caption
* @param quotedMessageId Quoted message id
* @param isViewOnce Enable single view
* @param mentionedList
*/
public async sendImageFromBase64(
to: string,
base64: string,
filename: string,
caption?: string,
quotedMessageId?: string,
isViewOnce?: boolean
isViewOnce?: boolean,
mentionedList?: any
) {
let mimeType = base64MimeType(base64);

Expand Down Expand Up @@ -274,6 +276,7 @@ export class SenderLayer extends ListenerLayer {
caption,
quotedMessageId,
isViewOnce,
mentionedList,
}) => {
const result = await WPP.chat.sendFileMessage(to, base64, {
type: 'image',
Expand All @@ -282,6 +285,8 @@ export class SenderLayer extends ListenerLayer {
caption,
quotedMsg: quotedMessageId,
waitForAck: true,
detectMentioned: true,
mentionedList: mentionedList,
});

return {
Expand All @@ -290,7 +295,15 @@ export class SenderLayer extends ListenerLayer {
sendMsgResult: await result.sendMsgResult,
};
},
{ to, base64, filename, caption, quotedMessageId, isViewOnce }
{
to,
base64,
filename,
caption,
quotedMessageId,
isViewOnce,
mentionedList,
}
);

return result;
Expand Down

0 comments on commit 8fa8f9d

Please sign in to comment.