diff --git a/app/mobile/src/dashboard/Dashboard.jsx b/app/mobile/src/dashboard/Dashboard.jsx
index aa015bfb..a1a7bd02 100644
--- a/app/mobile/src/dashboard/Dashboard.jsx
+++ b/app/mobile/src/dashboard/Dashboard.jsx
@@ -183,6 +183,14 @@ export function Dashboard(props) {
RSA 4096
+
+ actions.setPushSupported(!state.pushSupported)}>
+ Enable Push Notifications:
+
+
+
actions.setEnableImage(!state.enableImage)}>
Enable Image Queue:
diff --git a/app/mobile/src/dashboard/useDashboard.hook.js b/app/mobile/src/dashboard/useDashboard.hook.js
index bd6b88c1..1c8b3a83 100644
--- a/app/mobile/src/dashboard/useDashboard.hook.js
+++ b/app/mobile/src/dashboard/useDashboard.hook.js
@@ -96,6 +96,9 @@ export function useDashboard(config, server, token) {
setStorage: (storage) => {
updateState({ storage: Number(storage.replace(/[^0-9]/g, '')) });
},
+ setPushSupported: (pushSupported) => {
+ updateState({ pushSupported });
+ },
setEnableImage: (enableImage) => {
updateState({ enableImage });
},
diff --git a/doc/api.oa3 b/doc/api.oa3
index 35335bca..9f1bc7cb 100644
--- a/doc/api.oa3
+++ b/doc/api.oa3
@@ -3566,6 +3566,8 @@ components:
type: boolean
keyType:
type: string
+ pushSupported:
+ type: boolean
AccountStatus:
type: object
diff --git a/net/server/internal/api_getNodeConfig.go b/net/server/internal/api_getNodeConfig.go
index a657b734..0ff57a1a 100644
--- a/net/server/internal/api_getNodeConfig.go
+++ b/net/server/internal/api_getNodeConfig.go
@@ -21,6 +21,7 @@ func GetNodeConfig(w http.ResponseWriter, r *http.Request) {
config.EnableAudio = getBoolConfigValue(CNFEnableAudio, true)
config.EnableVideo = getBoolConfigValue(CNFEnableVideo, true)
config.KeyType = getStrConfigValue(CNFKeyType, APPRSA4096)
+ config.PushSupported = getBoolConfigValue(CNFPushSupported, true)
WriteResponse(w, config)
}
diff --git a/net/server/internal/api_setNodeConfig.go b/net/server/internal/api_setNodeConfig.go
index 8691539f..9ee4b55c 100644
--- a/net/server/internal/api_setNodeConfig.go
+++ b/net/server/internal/api_setNodeConfig.go
@@ -66,6 +66,14 @@ func SetNodeConfig(w http.ResponseWriter, r *http.Request) {
return res
}
+ // upsert push supported
+ if res := tx.Clauses(clause.OnConflict{
+ Columns: []clause.Column{{Name: "config_id"}},
+ DoUpdates: clause.AssignmentColumns([]string{"bool_value"}),
+ }).Create(&store.Config{ConfigID: CNFPushSupported, BoolValue: config.PushSupported}).Error; res != nil {
+ return res
+ }
+
// upsert key type
if res := tx.Clauses(clause.OnConflict{
Columns: []clause.Column{{Name: "config_id"}},
diff --git a/net/server/internal/models.go b/net/server/internal/models.go
index 5a45fbf9..97a61447 100644
--- a/net/server/internal/models.go
+++ b/net/server/internal/models.go
@@ -347,6 +347,8 @@ type NodeConfig struct {
KeyType string `json:"keyType"`
AccountStorage int64 `json:"accountStorage"`
+
+ PushSupported bool `json:"pushSupported"`
}
//Profile public attributes of account