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:
@@ -112,7 +112,7 @@ export const initAuthCreds = (): AuthenticationCreds => {
|
||||
}
|
||||
|
||||
/** stores the full authentication state in a single JSON file */
|
||||
export const useSingleFileAuthState = (filename: string): { state: AuthenticationState, saveState: () => void } => {
|
||||
export const useSingleFileAuthState = (filename: string, logger?: Logger): { state: AuthenticationState, saveState: () => void } => {
|
||||
// require fs here so that in case "fs" is not available -- the app does not crash
|
||||
const { readFileSync, writeFileSync, existsSync } = require('fs')
|
||||
let creds: AuthenticationCreds
|
||||
@@ -120,7 +120,7 @@ export const useSingleFileAuthState = (filename: string): { state: Authenticatio
|
||||
|
||||
// save the authentication state to a file
|
||||
const saveState = () => {
|
||||
console.log('saving auth state')
|
||||
logger && logger.trace('saving auth state')
|
||||
writeFileSync(
|
||||
filename,
|
||||
// BufferJSON replacer utility saves buffers nicely
|
||||
|
||||
Reference in New Issue
Block a user