accept onLocal in config
This commit is contained in:
@@ -94,6 +94,7 @@ define([
|
|||||||
/* end websocket stuff */
|
/* end websocket stuff */
|
||||||
|
|
||||||
var start = module.exports.start = function (config) {
|
var start = module.exports.start = function (config) {
|
||||||
|
|
||||||
var websocketUrl = config.websocketURL;
|
var websocketUrl = config.websocketURL;
|
||||||
var userName = config.userName;
|
var userName = config.userName;
|
||||||
var channel = config.channel;
|
var channel = config.channel;
|
||||||
@@ -153,8 +154,8 @@ define([
|
|||||||
|
|
||||||
// super important step that avoids us having
|
// super important step that avoids us having
|
||||||
// the 'backspace bug'
|
// the 'backspace bug'
|
||||||
if (toReturn.onLocal) {
|
if (config.onLocal) {
|
||||||
toReturn.onLocal();
|
config.onLocal();
|
||||||
}
|
}
|
||||||
|
|
||||||
realtime.message(message);
|
realtime.message(message);
|
||||||
|
|||||||
Reference in New Issue
Block a user