|
|
@ -20,15 +20,15 @@ module.exports = {
|
|
|
|
'waterdrop-low.mp3': 'Default | Water drop (low)',
|
|
|
|
'waterdrop-low.mp3': 'Default | Water drop (low)',
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
async.parallel([
|
|
|
|
|
|
|
|
function (cb) {
|
|
|
|
|
|
|
|
var keys = ['chat-incoming', 'chat-outgoing', 'notification'];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
db.getObject('settings:sounds', function (err, settings) {
|
|
|
|
db.getObject('settings:sounds', function (err, settings) {
|
|
|
|
if (err || !settings) {
|
|
|
|
if (err || !settings) {
|
|
|
|
return cb(err);
|
|
|
|
return callback(err);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
async.parallel([
|
|
|
|
|
|
|
|
function (cb) {
|
|
|
|
|
|
|
|
var keys = ['chat-incoming', 'chat-outgoing', 'notification'];
|
|
|
|
|
|
|
|
|
|
|
|
keys.forEach(function (key) {
|
|
|
|
keys.forEach(function (key) {
|
|
|
|
if (settings[key] && settings[key].indexOf(' | ') === -1) {
|
|
|
|
if (settings[key] && settings[key].indexOf(' | ') === -1) {
|
|
|
|
settings[key] = map[settings[key]] || '';
|
|
|
|
settings[key] = map[settings[key]] || '';
|
|
|
@ -36,7 +36,6 @@ module.exports = {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
meta.configs.setMultiple(settings, cb);
|
|
|
|
meta.configs.setMultiple(settings, cb);
|
|
|
|
});
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
function (cb) {
|
|
|
|
function (cb) {
|
|
|
|
var keys = ['notificationSound', 'incomingChatSound', 'outgoingChatSound'];
|
|
|
|
var keys = ['notificationSound', 'incomingChatSound', 'outgoingChatSound'];
|
|
|
@ -60,5 +59,6 @@ module.exports = {
|
|
|
|
}, cb);
|
|
|
|
}, cb);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
], callback);
|
|
|
|
], callback);
|
|
|
|
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
};
|
|
|
|