Rename doSendWithCallback to send
This commit is contained in:
parent
a3ea312773
commit
0c3496f798
1 changed files with 3 additions and 3 deletions
|
@ -206,7 +206,7 @@ weechat.factory('connection', ['$q', '$rootScope', '$log', '$store', 'handlers',
|
||||||
return defer;
|
return defer;
|
||||||
}
|
}
|
||||||
|
|
||||||
var doSendWithCallback = function(message) {
|
var send = function(message) {
|
||||||
message.replace(/[\r\n]+$/g, "").split("\n");
|
message.replace(/[\r\n]+$/g, "").split("\n");
|
||||||
var cb = createCallback(message);
|
var cb = createCallback(message);
|
||||||
websocket.send(callBackIdString + " " + message);
|
websocket.send(callBackIdString + " " + message);
|
||||||
|
@ -224,7 +224,7 @@ weechat.factory('connection', ['$q', '$rootScope', '$log', '$store', 'handlers',
|
||||||
var doSendAllWithCallback = function(messages) {
|
var doSendAllWithCallback = function(messages) {
|
||||||
var promises = [];
|
var promises = [];
|
||||||
for(i in messages) {
|
for(i in messages) {
|
||||||
var promise = doSendWithCallback(messages[i]);
|
var promise = send(messages[i]);
|
||||||
promises.push(promise);
|
promises.push(promise);
|
||||||
};
|
};
|
||||||
return $q.all(promises);
|
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
|
// Sanitizes messages to be sent to the weechat relay
|
||||||
var doSend = function(message) {
|
var doSend = function(message) {
|
||||||
doSendWithCallback(message);
|
send(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Takes care of the connection and websocket hooks
|
// Takes care of the connection and websocket hooks
|
||||||
|
|
Loading…
Reference in a new issue