chore: use provided pictures visibility options when creating settings db entry (#2867)
When initially creating settings, properties 'initialize profile_pictures_show_to' and 'profile_pictures_visibility' are set according to the provided Setting object.
This commit is contained in:
parent
571ab4c88d
commit
057c7915f4
|
@ -109,10 +109,12 @@ INSERT INTO settings (
|
||||||
signing_phrase,
|
signing_phrase,
|
||||||
wallet_root_address,
|
wallet_root_address,
|
||||||
synthetic_id,
|
synthetic_id,
|
||||||
current_user_status
|
current_user_status,
|
||||||
|
profile_pictures_show_to,
|
||||||
|
profile_pictures_visibility
|
||||||
) VALUES (
|
) VALUES (
|
||||||
?,?,?,?,?,?,?,?,?,?,?,?,
|
?,?,?,?,?,?,?,?,?,?,?,?,
|
||||||
?,?,?,?,?,?,?,?,?,'id',?)`,
|
?,?,?,?,?,?,?,?,?,'id',?,?,?)`,
|
||||||
s.Address,
|
s.Address,
|
||||||
s.Currency,
|
s.Currency,
|
||||||
s.CurrentNetwork,
|
s.CurrentNetwork,
|
||||||
|
@ -135,6 +137,8 @@ INSERT INTO settings (
|
||||||
s.SigningPhrase,
|
s.SigningPhrase,
|
||||||
s.WalletRootAddress,
|
s.WalletRootAddress,
|
||||||
s.CurrentUserStatus,
|
s.CurrentUserStatus,
|
||||||
|
s.ProfilePicturesShowTo,
|
||||||
|
s.ProfilePicturesVisibility,
|
||||||
)
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
|
@ -141,6 +141,7 @@ func (s *MessengerSyncSettingsSuite) newMessengerWithOptions(shh types.Waku, pri
|
||||||
PublicKey: "0x04112233445566778899001122334455667788990011223344556677889900112233445566778899001122334455667788990011223344556677889900",
|
PublicKey: "0x04112233445566778899001122334455667788990011223344556677889900112233445566778899001122334455667788990011223344556677889900",
|
||||||
SigningPhrase: "yurt joey vibe",
|
SigningPhrase: "yurt joey vibe",
|
||||||
SendPushNotifications: true,
|
SendPushNotifications: true,
|
||||||
|
ProfilePicturesShowTo: 1,
|
||||||
ProfilePicturesVisibility: 1,
|
ProfilePicturesVisibility: 1,
|
||||||
DefaultSyncPeriod: 86400,
|
DefaultSyncPeriod: 86400,
|
||||||
UseMailservers: true,
|
UseMailservers: true,
|
||||||
|
|
|
@ -131,7 +131,10 @@ func newMessengerWithKey(shh types.Waku, privateKey *ecdsa.PrivateKey, logger *z
|
||||||
WithAccount(iai.ToMultiAccount()),
|
WithAccount(iai.ToMultiAccount()),
|
||||||
WithDatasync(),
|
WithDatasync(),
|
||||||
WithToplevelDatabaseMigrations(),
|
WithToplevelDatabaseMigrations(),
|
||||||
WithAppSettings(settings.Settings{}, params.NodeConfig{}),
|
WithAppSettings(settings.Settings{
|
||||||
|
ProfilePicturesShowTo: 1,
|
||||||
|
ProfilePicturesVisibility: 1,
|
||||||
|
}, params.NodeConfig{}),
|
||||||
WithBrowserDatabase(nil),
|
WithBrowserDatabase(nil),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue