Baileys icon indicating copy to clipboard operation
Baileys copied to clipboard

Pin Messages

Open DavidModzz opened this issue 1 year ago • 1 comments

Implement the new pinning feature

Screenshot_20231019_121649.jpg

DavidModzz avatar Oct 22 '23 14:10 DavidModzz

let templategenerate= await generateWAMessageFromContent(from, proto.Message.fromObject({pinInChatMessage: { key: message.key, type: 1, senderTimestampMs: new Date().getTime() / 1000 }}), {})

let templatenew = { messageContextInfo: { messageAddOnDurationInSecs: 604800 }, ...templategenerate.message }

await conn.relayMessage(from, templatenew, { messageId: templategenerate.key.id })

It only works on WhatsApp Web.

gusta4321 avatar Apr 21 '24 21:04 gusta4321