| 
									
										
										
										
											2014-01-10 16:00:03 -05:00
										 |  |  | "use strict"; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-11-25 23:08:28 -05:00
										 |  |  | var	nconf = require('nconf'), | 
					
						
							|  |  |  | 	async = require('async'), | 
					
						
							|  |  |  | 	S = require('string'), | 
					
						
							|  |  |  | 	winston = require('winston'), | 
					
						
							|  |  |  | 	_ = require('underscore'), | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	posts = require('../posts'), | 
					
						
							| 
									
										
										
										
											2014-01-10 16:00:03 -05:00
										 |  |  | 	postTools = require('../postTools'), | 
					
						
							|  |  |  | 	topics = require('../topics'), | 
					
						
							|  |  |  | 	meta = require('../meta'), | 
					
						
							|  |  |  | 	Messaging = require('../messaging'), | 
					
						
							|  |  |  | 	user = require('../user'), | 
					
						
							| 
									
										
										
										
											2014-01-18 15:35:51 -05:00
										 |  |  | 	plugins = require('../plugins'), | 
					
						
							| 
									
										
										
										
											2014-07-08 11:55:55 -04:00
										 |  |  | 	utils = require('../../public/src/utils'), | 
					
						
							| 
									
										
										
										
											2014-11-25 23:08:28 -05:00
										 |  |  | 	privileges = require('../privileges'), | 
					
						
							| 
									
										
										
										
											2014-01-10 16:00:03 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-01-16 20:14:09 -05:00
										 |  |  | 	server = require('./'), | 
					
						
							| 
									
										
										
										
											2014-11-25 23:08:28 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-01-10 16:00:03 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-03-14 00:34:51 -04:00
										 |  |  | 	SocketModules = { | 
					
						
							| 
									
										
										
										
											2014-10-25 19:19:47 -04:00
										 |  |  | 		composer: {}, | 
					
						
							| 
									
										
										
										
											2014-03-14 00:34:51 -04:00
										 |  |  | 		chats: {}, | 
					
						
							|  |  |  | 		sounds: {}, | 
					
						
							|  |  |  | 		settings: {} | 
					
						
							|  |  |  | 	}; | 
					
						
							| 
									
										
										
										
											2014-01-10 16:00:03 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  | /* Posts Composer */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-01-16 22:06:23 -05:00
										 |  |  | SocketModules.composer.push = function(socket, pid, callback) { | 
					
						
							| 
									
										
										
										
											2014-11-25 23:08:28 -05:00
										 |  |  | 	privileges.posts.can('read', pid, socket.uid, function(err, canRead) { | 
					
						
							|  |  |  | 		if (err || !canRead) { | 
					
						
							|  |  |  | 			return callback(err || new Error('[[error:no-privileges]]')); | 
					
						
							| 
									
										
										
										
											2014-04-09 21:36:57 -04:00
										 |  |  | 		} | 
					
						
							| 
									
										
										
										
											2014-12-31 21:27:41 -05:00
										 |  |  | 		posts.getPostFields(pid, ['content', 'tid', 'uid', 'handle'], function(err, postData) { | 
					
						
							| 
									
										
										
										
											2014-11-25 23:08:28 -05:00
										 |  |  | 			if(err || (!postData && !postData.content)) { | 
					
						
							|  |  |  | 				return callback(err || new Error('[[error:invalid-pid]]')); | 
					
						
							| 
									
										
										
										
											2014-04-09 21:36:57 -04:00
										 |  |  | 			} | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-11-25 23:08:28 -05:00
										 |  |  | 			async.parallel({ | 
					
						
							|  |  |  | 				topic: function(next) { | 
					
						
							|  |  |  | 					topics.getTopicDataByPid(pid, next); | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				tags: function(next) { | 
					
						
							|  |  |  | 					topics.getTopicTags(postData.tid, next); | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				isMain: function(next) { | 
					
						
							|  |  |  | 					posts.isMain(pid, next); | 
					
						
							|  |  |  | 				} | 
					
						
							|  |  |  | 			}, function(err, results) { | 
					
						
							|  |  |  | 				if(err) { | 
					
						
							|  |  |  | 					return callback(err); | 
					
						
							|  |  |  | 				} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 				if (!results.topic) { | 
					
						
							|  |  |  | 					return callback(new Error('[[error:no-topic]]')); | 
					
						
							|  |  |  | 				} | 
					
						
							| 
									
										
										
										
											2014-09-01 17:24:18 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-11-25 23:08:28 -05:00
										 |  |  | 				callback(null, { | 
					
						
							|  |  |  | 					pid: pid, | 
					
						
							| 
									
										
										
										
											2014-12-31 20:48:32 -05:00
										 |  |  | 					uid: postData.uid, | 
					
						
							| 
									
										
										
										
											2014-12-31 21:27:41 -05:00
										 |  |  | 					handle: parseInt(meta.config.allowGuestHandles, 10) ? postData.handle : undefined, | 
					
						
							| 
									
										
										
										
											2014-11-25 23:08:28 -05:00
										 |  |  | 					body: postData.content, | 
					
						
							|  |  |  | 					title: results.topic.title, | 
					
						
							|  |  |  | 					topic_thumb: results.topic.thumb, | 
					
						
							|  |  |  | 					tags: results.tags, | 
					
						
							|  |  |  | 					isMain: results.isMain | 
					
						
							|  |  |  | 				}); | 
					
						
							| 
									
										
										
										
											2014-04-09 21:36:57 -04:00
										 |  |  | 			}); | 
					
						
							|  |  |  | 		}); | 
					
						
							|  |  |  | 	}); | 
					
						
							| 
									
										
										
										
											2014-01-10 16:00:03 -05:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-01-16 15:28:21 -05:00
										 |  |  | SocketModules.composer.editCheck = function(socket, pid, callback) { | 
					
						
							| 
									
										
										
										
											2014-06-23 18:06:59 -04:00
										 |  |  | 	posts.isMain(pid, function(err, isMain) { | 
					
						
							|  |  |  | 		callback(err, { | 
					
						
							|  |  |  | 			titleEditable: isMain | 
					
						
							| 
									
										
										
										
											2014-01-10 16:00:03 -05:00
										 |  |  | 		}); | 
					
						
							|  |  |  | 	}); | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-01-17 16:16:00 -05:00
										 |  |  | SocketModules.composer.renderPreview = function(socket, content, callback) { | 
					
						
							| 
									
										
										
										
											2014-11-05 18:59:20 -05:00
										 |  |  | 	plugins.fireHook('filter:parse.raw', content, callback); | 
					
						
							| 
									
										
										
										
											2014-02-27 14:05:31 -05:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | SocketModules.composer.renderHelp = function(socket, data, callback) { | 
					
						
							| 
									
										
										
										
											2014-05-10 23:43:15 -04:00
										 |  |  | 	var helpText = meta.config['composer:customHelpText'] || ''; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	if (meta.config['composer:showHelpTab'] === '0') { | 
					
						
							|  |  |  | 		return callback(new Error('help-hidden')); | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-11-05 18:59:20 -05:00
										 |  |  | 	plugins.fireHook('filter:parse.raw', helpText, function(err, helpText) { | 
					
						
							| 
									
										
										
										
											2014-05-10 23:43:15 -04:00
										 |  |  | 		if (!meta.config['composer:allowPluginHelp'] || meta.config['composer:allowPluginHelp'] === '1') { | 
					
						
							|  |  |  | 			plugins.fireHook('filter:composer.help', helpText, callback); | 
					
						
							|  |  |  | 		} else { | 
					
						
							|  |  |  | 			callback(null, helpText); | 
					
						
							|  |  |  | 		} | 
					
						
							|  |  |  | 	}); | 
					
						
							| 
									
										
										
										
											2014-02-27 14:05:31 -05:00
										 |  |  | }; | 
					
						
							| 
									
										
										
										
											2014-01-17 16:16:00 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-10-25 19:19:47 -04:00
										 |  |  | SocketModules.composer.notifyTyping = function(socket, data) { | 
					
						
							| 
									
										
										
										
											2014-10-29 00:10:57 -04:00
										 |  |  | 	if (!socket.uid || !parseInt(data.tid, 10)) { | 
					
						
							| 
									
										
										
										
											2014-10-25 19:22:13 -04:00
										 |  |  | 		return; | 
					
						
							|  |  |  | 	} | 
					
						
							| 
									
										
										
										
											2014-10-25 19:19:47 -04:00
										 |  |  | 	server.in('topic_' + data.tid).emit('event:topic.notifyTyping', data); | 
					
						
							| 
									
										
										
										
											2014-03-01 15:46:13 -05:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-10-25 19:19:47 -04:00
										 |  |  | SocketModules.composer.stopNotifyTyping = function(socket, data) { | 
					
						
							| 
									
										
										
										
											2014-10-29 00:10:57 -04:00
										 |  |  | 	if (!socket.uid || !parseInt(data.tid, 10)) { | 
					
						
							| 
									
										
										
										
											2014-10-25 19:22:13 -04:00
										 |  |  | 		return; | 
					
						
							|  |  |  | 	} | 
					
						
							| 
									
										
										
										
											2014-10-25 19:19:47 -04:00
										 |  |  | 	server.in('topic_' + data.tid).emit('event:topic.stopNotifyTyping', data); | 
					
						
							| 
									
										
										
										
											2014-03-28 12:13:01 -04:00
										 |  |  | }; | 
					
						
							| 
									
										
										
										
											2014-03-01 21:31:50 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-02-19 16:51:10 -05:00
										 |  |  | SocketModules.composer.getFormattingOptions = function(socket, data, callback) { | 
					
						
							|  |  |  | 	plugins.fireHook('filter:composer.formatting', { | 
					
						
							|  |  |  | 		options: [ | 
					
						
							|  |  |  | 			// { className: 'fa fa-bold' }    Just an example of what needs to be set via plugins
 | 
					
						
							|  |  |  | 		] | 
					
						
							|  |  |  | 	}, function(err, payload) { | 
					
						
							|  |  |  | 		callback(err, payload.options); | 
					
						
							|  |  |  | 	}); | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-01-10 16:00:03 -05:00
										 |  |  | /* Chat */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-01-16 15:28:21 -05:00
										 |  |  | SocketModules.chats.get = function(socket, data, callback) { | 
					
						
							| 
									
										
										
										
											2014-01-17 12:55:38 -05:00
										 |  |  | 	if(!data) { | 
					
						
							| 
									
										
										
										
											2014-04-09 21:36:57 -04:00
										 |  |  | 		return callback(new Error('[[error:invalid-data]]')); | 
					
						
							| 
									
										
										
										
											2014-01-17 12:55:38 -05:00
										 |  |  | 	} | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-09-17 16:29:03 -04:00
										 |  |  | 	Messaging.getMessages(socket.uid, data.touid, data.since, false, callback); | 
					
						
							| 
									
										
										
										
											2014-01-10 16:00:03 -05:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-03-28 12:13:01 -04:00
										 |  |  | SocketModules.chats.send = function(socket, data, callback) { | 
					
						
							| 
									
										
										
										
											2014-11-13 15:47:25 -05:00
										 |  |  | 	if (!data) { | 
					
						
							| 
									
										
										
										
											2014-04-09 21:36:57 -04:00
										 |  |  | 		return callback(new Error('[[error:invalid-data]]')); | 
					
						
							| 
									
										
										
										
											2014-01-17 12:55:38 -05:00
										 |  |  | 	} | 
					
						
							| 
									
										
										
										
											2014-01-10 16:00:03 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-11-13 15:47:25 -05:00
										 |  |  | 	if (parseInt(meta.config.disableChat) === 1) { | 
					
						
							|  |  |  | 		return callback(new Error('[[error:chat-disabled]]')); | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-04-23 21:47:51 -04:00
										 |  |  | 	var touid = parseInt(data.touid, 10); | 
					
						
							| 
									
										
										
										
											2014-01-16 15:28:21 -05:00
										 |  |  | 	if (touid === socket.uid || socket.uid === 0) { | 
					
						
							| 
									
										
										
										
											2014-01-10 16:00:03 -05:00
										 |  |  | 		return; | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-10-15 14:49:11 -04:00
										 |  |  | 	var msg = S(data.message).stripTags().s; | 
					
						
							| 
									
										
										
										
											2014-07-23 18:23:03 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-10-15 14:49:11 -04:00
										 |  |  | 	var now = Date.now(); | 
					
						
							|  |  |  | 	socket.lastChatMessageTime = socket.lastChatMessageTime || 0; | 
					
						
							| 
									
										
										
										
											2014-07-23 18:23:03 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-10-15 14:49:11 -04:00
										 |  |  | 	if (now - socket.lastChatMessageTime < 200) { | 
					
						
							|  |  |  | 		return callback(new Error('[[error:too-many-messages]]')); | 
					
						
							|  |  |  | 	} | 
					
						
							| 
									
										
										
										
											2014-07-23 18:23:03 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-10-15 14:49:11 -04:00
										 |  |  | 	socket.lastChatMessageTime = now; | 
					
						
							| 
									
										
										
										
											2014-01-10 16:00:03 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-11-13 16:03:11 -05:00
										 |  |  | 	user.getUserFields(socket.uid, ['banned', 'email:confirmed'], function(err, userData) { | 
					
						
							| 
									
										
										
										
											2014-03-28 12:13:01 -04:00
										 |  |  | 		if (err) { | 
					
						
							|  |  |  | 			return callback(err); | 
					
						
							| 
									
										
										
										
											2014-01-10 16:00:03 -05:00
										 |  |  | 		} | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-11-13 16:03:11 -05:00
										 |  |  | 		if (parseInt(userData.banned, 10) === 1) { | 
					
						
							| 
									
										
										
										
											2014-10-03 15:28:46 -04:00
										 |  |  | 			return callback(new Error('[[error:user-banned]]')); | 
					
						
							|  |  |  | 		} | 
					
						
							| 
									
										
										
										
											2014-01-10 16:00:03 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-11-13 16:03:11 -05:00
										 |  |  | 		if (parseInt(meta.config.requireEmailConfirmation, 10) === 1 && parseInt(userData['email:confirmed'], 10) !== 1) { | 
					
						
							| 
									
										
										
										
											2014-12-21 14:14:46 -05:00
										 |  |  | 			return callback(new Error('[[error:email-not-confirmed-chat]]')); | 
					
						
							| 
									
										
										
										
											2014-11-13 16:03:11 -05:00
										 |  |  | 		} | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-10-30 17:50:07 -04:00
										 |  |  | 		Messaging.canMessage(socket.uid, touid, function(err, allowed) { | 
					
						
							| 
									
										
										
										
											2014-11-13 15:49:43 -05:00
										 |  |  | 			if (err || !allowed) { | 
					
						
							|  |  |  | 				return callback(err || new Error('[[error:chat-restricted]]')); | 
					
						
							| 
									
										
										
										
											2014-10-03 15:28:46 -04:00
										 |  |  | 			} | 
					
						
							| 
									
										
										
										
											2014-11-13 15:49:43 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  | 			Messaging.addMessage(socket.uid, touid, msg, function(err, message) { | 
					
						
							|  |  |  | 				if (err) { | 
					
						
							|  |  |  | 					return callback(err); | 
					
						
							|  |  |  | 				} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 				Messaging.notifyUser(socket.uid, touid, message); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 				// Recipient
 | 
					
						
							|  |  |  | 				SocketModules.chats.pushUnreadCount(touid); | 
					
						
							|  |  |  | 				server.in('uid_' + touid).emit('event:chats.receive', { | 
					
						
							|  |  |  | 					withUid: socket.uid, | 
					
						
							|  |  |  | 					message: message, | 
					
						
							|  |  |  | 					self: 0 | 
					
						
							|  |  |  | 				}); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 				// Sender
 | 
					
						
							|  |  |  | 				SocketModules.chats.pushUnreadCount(socket.uid); | 
					
						
							|  |  |  | 				server.in('uid_' + socket.uid).emit('event:chats.receive', { | 
					
						
							|  |  |  | 					withUid: touid, | 
					
						
							|  |  |  | 					message: message, | 
					
						
							|  |  |  | 					self: 1 | 
					
						
							|  |  |  | 				}); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 				callback(); | 
					
						
							|  |  |  | 			}); | 
					
						
							|  |  |  | 		}); | 
					
						
							| 
									
										
										
										
											2014-10-30 17:50:07 -04:00
										 |  |  | 	}); | 
					
						
							|  |  |  | }; | 
					
						
							| 
									
										
										
										
											2014-10-03 15:28:46 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-10-30 17:50:07 -04:00
										 |  |  | SocketModules.chats.canMessage = function(socket, toUid, callback) { | 
					
						
							|  |  |  | 	Messaging.canMessage(socket.uid, toUid, function(err, allowed) { | 
					
						
							|  |  |  | 		callback(!allowed ? new Error('[[error:chat-restricted]]') : undefined); | 
					
						
							| 
									
										
										
										
											2014-01-10 16:00:03 -05:00
										 |  |  | 	}); | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-07-19 10:33:27 -04:00
										 |  |  | SocketModules.chats.pushUnreadCount = function(uid) { | 
					
						
							|  |  |  | 	Messaging.getUnreadCount(uid, function(err, unreadCount) { | 
					
						
							|  |  |  | 		if (err) { | 
					
						
							|  |  |  | 			return; | 
					
						
							|  |  |  | 		} | 
					
						
							| 
									
										
										
										
											2014-09-03 17:22:29 -04:00
										 |  |  | 		server.in('uid_' + uid).emit('event:unread.updateChatCount', null, unreadCount); | 
					
						
							| 
									
										
										
										
											2014-07-19 10:33:27 -04:00
										 |  |  | 	}); | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | SocketModules.chats.markRead = function(socket, touid, callback) { | 
					
						
							|  |  |  | 	Messaging.markRead(socket.uid, touid, function(err) { | 
					
						
							|  |  |  | 		if (!err) { | 
					
						
							|  |  |  | 			SocketModules.chats.pushUnreadCount(socket.uid); | 
					
						
							|  |  |  | 		} | 
					
						
							|  |  |  | 	}); | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-04-15 12:48:28 -04:00
										 |  |  | SocketModules.chats.userStartTyping = function(socket, data, callback) { | 
					
						
							|  |  |  | 	sendTypingNotification('event:chats.userStartTyping', socket, data, callback); | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | SocketModules.chats.userStopTyping = function(socket, data, callback) { | 
					
						
							|  |  |  | 	sendTypingNotification('event:chats.userStopTyping', socket, data, callback); | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | function sendTypingNotification(event, socket, data, callback) { | 
					
						
							|  |  |  | 	if (!socket.uid || !data) { | 
					
						
							|  |  |  | 		return; | 
					
						
							|  |  |  | 	} | 
					
						
							| 
									
										
										
										
											2014-09-03 18:07:56 -04:00
										 |  |  | 	server.in('uid_' + data.touid).emit(event, data.fromUid); | 
					
						
							| 
									
										
										
										
											2014-04-15 12:48:28 -04:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-09-15 16:26:25 -04:00
										 |  |  | SocketModules.chats.getRecentChats = function(socket, data, callback) { | 
					
						
							|  |  |  | 	if (!data || !utils.isNumber(data.after)) { | 
					
						
							|  |  |  | 		return callback(new Error('[[error:invalid-data]]')); | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 	var start = parseInt(data.after, 10), | 
					
						
							|  |  |  | 		end = start + 9; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	Messaging.getRecentChats(socket.uid, start, end, callback); | 
					
						
							| 
									
										
										
										
											2014-01-10 16:00:03 -05:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-03-13 17:15:07 -04:00
										 |  |  | /* Sounds */ | 
					
						
							| 
									
										
										
										
											2014-03-14 00:34:51 -04:00
										 |  |  | SocketModules.sounds.getSounds = function(socket, data, callback) { | 
					
						
							| 
									
										
										
										
											2014-03-13 17:15:07 -04:00
										 |  |  | 	// Read sounds from local directory
 | 
					
						
							| 
									
										
										
										
											2014-04-12 18:33:52 -04:00
										 |  |  | 	meta.sounds.getFiles(callback); | 
					
						
							| 
									
										
										
										
											2014-03-13 17:15:07 -04:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-03-14 00:34:51 -04:00
										 |  |  | SocketModules.sounds.getMapping = function(socket, data, callback) { | 
					
						
							| 
									
										
										
										
											2014-03-13 17:15:07 -04:00
										 |  |  | 	meta.sounds.getMapping(callback); | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-04-10 20:31:57 +01:00
										 |  |  | module.exports = SocketModules; |