mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
Added List message support and removed "saving auth state" (#1048)
* Added template support and footers for buttons & templates * Template message readme * got rid of "saving auth state" and added lists * added body * Update README.md
This commit is contained in:
@@ -314,6 +314,18 @@ export const generateWAMessageContent = async(
|
||||
|
||||
m = { templateMessage }
|
||||
}
|
||||
|
||||
if ('sections' in message && !!message.sections) {
|
||||
const listMessage: proto.IListMessage = {
|
||||
sections: message.sections,
|
||||
buttonText: message.buttonText,
|
||||
title: message.title,
|
||||
footerText: message.footer,
|
||||
description: message.text
|
||||
}
|
||||
|
||||
m = { listMessage }
|
||||
}
|
||||
|
||||
if('viewOnce' in message && !!message.viewOnce) {
|
||||
m = { viewOnceMessage: { message: m } }
|
||||
|
||||
Reference in New Issue
Block a user