Browse Source
fix: fix device ID nil checks in initialization
pull/254/head
almogbaku
1 year ago
No known key found for this signature in database
GPG Key ID: 66C92B1C5B475512
1 changed files with
2 additions and
2 deletions
-
src/pkg/whatsapp/init.go
|
|
|
@ -80,7 +80,7 @@ func InitWaCLI(storeContainer, keysStoreContainer *sqlstore.Container) *whatsmeo |
|
|
|
panic(err) |
|
|
|
} |
|
|
|
|
|
|
|
if device == nil || device.ID == nil { |
|
|
|
if device == nil { |
|
|
|
log.Errorf("No device found") |
|
|
|
panic("No device found") |
|
|
|
} |
|
|
|
@ -89,7 +89,7 @@ func InitWaCLI(storeContainer, keysStoreContainer *sqlstore.Container) *whatsmeo |
|
|
|
store.DeviceProps.PlatformType = &config.AppPlatform |
|
|
|
store.DeviceProps.Os = &osName |
|
|
|
|
|
|
|
if keysStoreContainer != nil { |
|
|
|
if keysStoreContainer != nil && device.ID != nil { |
|
|
|
innerStore := sqlstore.NewSQLStore(keysStoreContainer, *device.ID) |
|
|
|
device.Identities = innerStore |
|
|
|
device.Sessions = innerStore |
|
|
|
|