From 706b5838a1f2b1315fac1aaad46c824ddb531fa1 Mon Sep 17 00:00:00 2001 From: David Cormier Date: Sat, 14 Dec 2013 10:32:14 -0500 Subject: [PATCH] Return the angular promise on sendMessage --- js/websockets.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/js/websockets.js b/js/websockets.js index c674fd6..45aef57 100644 --- a/js/websockets.js +++ b/js/websockets.js @@ -396,8 +396,13 @@ weechat.factory('connection', ['$q', '$rootScope', '$log', '$store', 'handlers', this.websocket.close(); } + /* + * Format and send a weechat message + * + * @returns the angular promise + */ var sendMessage = function(message) { - send(weeChat.Protocol.formatInput({ + return send(weeChat.Protocol.formatInput({ buffer: models.getActiveBuffer()['fullName'], data: message }));