Merge pull request #5456 from NodeBB/sounds-refactor

Sound system improvements
This commit is contained in:
Julian Lam
2017-02-21 16:14:58 -05:00
committed by GitHub
16 changed files with 338 additions and 260 deletions

View File

@@ -341,20 +341,8 @@ SocketModules.chats.getMessages = function (socket, data, callback) {
};
/* Sounds */
SocketModules.sounds.getSounds = function (socket, data, callback) {
// Read sounds from local directory
meta.sounds.getFiles(callback);
};
SocketModules.sounds.getMapping = function (socket, data, callback) {
meta.sounds.getMapping(socket.uid, callback);
};
SocketModules.sounds.getData = function (socket, data, callback) {
async.parallel({
mapping: async.apply(meta.sounds.getMapping, socket.uid),
files: async.apply(meta.sounds.getFiles)
}, callback);
SocketModules.sounds.getUserSoundMap = function getUserSoundMap(socket, data, callback) {
meta.sounds.getUserSoundMap(socket.uid, callback);
};
module.exports = SocketModules;