From c6629f51e9643edb5773bd78d697512e723da630 Mon Sep 17 00:00:00 2001 From: Darren Date: Fri, 19 Sep 2014 14:51:43 +0100 Subject: [PATCH] Consistent rpc API between browser<->server --- client/src/app.js | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/client/src/app.js b/client/src/app.js index 6f95977..0ff5665 100644 --- a/client/src/app.js +++ b/client/src/app.js @@ -20,6 +20,7 @@ _kiwi.global = { settings: undefined, // Instance of _kiwi.model.DataStore plugins: undefined, // Instance of _kiwi.model.PluginManager events: undefined, // Instance of PluginInterface + rpc: undefined, // Instance of WebsocketRpc utils: {}, // References to misc. re-usable helpers / functions initUtils: function() { @@ -32,22 +33,6 @@ _kiwi.global = { this.utils.hsl2rgb = hsl2rgb; }, - rpc: function() { - if (!_kiwi.gateway.rpc) { - throw 'RPC unavailable. Is Kiwi connected to the server yet?'; - } - - return _kiwi.gateway.rpc.apply(_kiwi.gateway.rpc, arguments); - }, - - rpcNamespace: function(namespace) { - if (!_kiwi.gateway.rpc) { - throw 'RPC unavailable. Is Kiwi connected to the server yet?'; - } - - return _kiwi.gateway.rpc.namespace(namespace); - }, - addMediaMessageType: function(match, buildHtml) { _kiwi.view.MediaMessage.addType(match, buildHtml); }, -- 2.25.1