Rename doSendWithCallback to send

This commit is contained in:
David Cormier 2013-10-27 12:05:37 -04:00
parent a3ea312773
commit 0c3496f798

View file

@ -206,7 +206,7 @@ weechat.factory('connection', ['$q', '$rootScope', '$log', '$store', 'handlers',
return defer;
}
var doSendWithCallback = function(message) {
var send = function(message) {
message.replace(/[\r\n]+$/g, "").split("\n");
var cb = createCallback(message);
websocket.send(callBackIdString + " " + message);
@ -224,7 +224,7 @@ weechat.factory('connection', ['$q', '$rootScope', '$log', '$store', 'handlers',
var doSendAllWithCallback = function(messages) {
var promises = [];
for(i in messages) {
var promise = doSendWithCallback(messages[i]);
var promise = send(messages[i]);
promises.push(promise);
};
return $q.all(promises);
@ -232,7 +232,7 @@ weechat.factory('connection', ['$q', '$rootScope', '$log', '$store', 'handlers',
// Sanitizes messages to be sent to the weechat relay
var doSend = function(message) {
doSendWithCallback(message);
send(message);
}
// Takes care of the connection and websocket hooks