Browse Source

fix: initialize DBKeys only if DBKeysURI is provided

pull/254/head
almogbaku 1 year ago
parent
commit
7446a831fc
No known key found for this signature in database GPG Key ID: 66C92B1C5B475512
  1. 7
      src/cmd/root.go

7
src/cmd/root.go

@ -3,6 +3,7 @@ package cmd
import (
"embed"
"fmt"
"go.mau.fi/whatsmeow/store/sqlstore"
"log"
"net/http"
"os"
@ -240,7 +241,11 @@ func runRest(_ *cobra.Command, _ []string) {
}
db := whatsapp.InitWaDB(config.DBURI)
dbKeys := whatsapp.InitWaDB(config.DBKeysURI)
var dbKeys *sqlstore.Container
if config.DBKeysURI != "" {
dbKeys = whatsapp.InitWaDB(config.DBKeysURI)
}
cli := whatsapp.InitWaCLI(db, dbKeys)
// Service

Loading…
Cancel
Save