From 835bfbddb046a60e63fe13be4c8ca3a36d4ceab9 Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Tue, 31 Jan 2023 22:19:27 -0700 Subject: [PATCH] Return to prev on save --- core/activitypub/user_config.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/core/activitypub/user_config.js b/core/activitypub/user_config.js index a56f29ed..89525387 100644 --- a/core/activitypub/user_config.js +++ b/core/activitypub/user_config.js @@ -101,7 +101,16 @@ exports.getModule = class ActivityPubUserConfig extends MenuModule { apSettings.hideSocialGraph = values.hideSocialGraph; apSettings.showRealName = values.showRealName; - return apSettings.persistToUserProperties(this.client.user, cb); + apSettings.persistToUserProperties(this.client.user, err => { + if (err) { + const user = this.client.user; + this.client.log.warn( + { error: err.message, user: user.username }, + `Failed saving ActivityPub settings for user "${user.username}"` + ); + } + return this.prevMenu(cb); + }); } _displayMainPage(clearScreen, cb) {