This commit is contained in:
Julian Lam
2014-11-24 12:48:21 -05:00
parent 1c21ca78dc
commit 1b526026a0
4 changed files with 17 additions and 9 deletions

View File

@@ -76,6 +76,7 @@ apiController.getConfig = function(req, res, next) {
config.userLang = settings.language || config.defaultLang;
config.openOutgoingLinksInNewTab = settings.openOutgoingLinksInNewTab;
config.topicPostSort = settings.topicPostSort || config.topicPostSort;
config.topicSearchEnabled = settings.topicSearchEnabled || false;
if (res.locals.isAPI) {
res.status(200).json(config);

View File

@@ -30,6 +30,7 @@ module.exports = function(User) {
settings.followTopicsOnReply = parseInt(settings.followTopicsOnReply, 10) === 1;
settings.sendChatNotifications = parseInt(settings.sendChatNotifications, 10) === 1;
settings.restrictChat = parseInt(settings.restrictChat, 10) === 1;
settings.topicSearchEnabled = parseInt(settings.topicSearchEnabled, 10) === 1;
callback(null, settings);
});
@@ -94,7 +95,8 @@ module.exports = function(User) {
followTopicsOnCreate: data.followTopicsOnCreate,
followTopicsOnReply: data.followTopicsOnReply,
sendChatNotifications: data.sendChatNotifications,
restrictChat: data.restrictChat
restrictChat: data.restrictChat,
topicSearchEnabled: data.topicSearchEnabled
}, callback);
};