chore: update deps

This commit is contained in:
eneller
2025-06-18 16:52:48 +02:00
parent 4a5de95615
commit 1ee8348c47
4 changed files with 36 additions and 33 deletions

View File

@@ -32,13 +32,13 @@ func eventHandler(evt interface{}) {
func initClient() (*whatsmeow.Client, *sqlstore.Container, waLog.Logger) {
dbLog := waLog.Stdout("Database", "DEBUG", true)
// Make sure you add appropriate DB connector imports, e.g. github.com/mattn/go-sqlite3 for SQLite
container, err := sqlstore.New("sqlite3", "file:sqlite3.db?_foreign_keys=on", dbLog)
container, err := sqlstore.New(context.Background(), "sqlite3", "file:sqlite3.db?_foreign_keys=on", dbLog)
if err != nil {
panic(err)
}
// If you want multiple sessions, remember their JIDs and use .GetDevice(jid) or .GetAllDevices() instead.
deviceStore, err := container.GetFirstDevice()
deviceStore, err := container.GetFirstDevice(context.Background())
if err != nil {
panic(err)
}