Browse Source
fix: initialize DBKeys only if DBKeysURI is provided
pull/254/head
almogbaku
1 year ago
No known key found for this signature in database
GPG Key ID: 66C92B1C5B475512
1 changed files with
6 additions and
1 deletions
-
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
|
|
|
|
|