From a6277b810efdb9a5b9f3e2fb8fbf53576e401724 Mon Sep 17 00:00:00 2001 From: Nicholas Wittstruck Date: Sat, 8 Nov 2014 15:41:16 +0100 Subject: [PATCH] fixed typo --- api_connector.js | 4 ++-- doc/api.md | 10 +++++----- external_api.js | 4 ++-- muc.js | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/api_connector.js b/api_connector.js index a28089f3b..48db3d333 100644 --- a/api_connector.js +++ b/api_connector.js @@ -31,7 +31,7 @@ var APIConnector = (function () { * Maps the supported events and their status * (true it the event is enabled and false if it is disabled) * @type {{ - * incommingMessage: boolean, + * incomingMessage: boolean, * outgoingMessage: boolean, * displayNameChange: boolean, * participantJoined: boolean, @@ -40,7 +40,7 @@ var APIConnector = (function () { */ var events = { - incommingMessage: false, + incomingMessage: false, outgoingMessage:false, displayNameChange: false, participantJoined: false, diff --git a/doc/api.md b/doc/api.md index 635be80c3..b77f93da2 100644 --- a/doc/api.md +++ b/doc/api.md @@ -91,7 +91,7 @@ with data related to the event. Currently we support the following events: -* **incommingMessage** - event notifications about incomming +* **incomingMessage** - event notifications about incoming messages. The listener will receive object with the following structure: ``` { @@ -135,7 +135,7 @@ This method requires one argument of type Object. The object argument must have keys with the names of the events and values the listeners of the events. ``` -function incommingMessageListener(object) +function incomingMessageListener(object) { ... } @@ -146,19 +146,19 @@ function outgoingMessageListener(object) } api.addEventListeners({ - incommingMessage: incommingMessageListener, + incomingMessage: incomingMessageListener, outgoingMessage: outgoingMessageListener}) ``` If you want to remove a listener you can use ```removeEventListener``` method with argument the name of the event. ``` -api.removeEventListener("incommingMessage"); +api.removeEventListener("incomingMessage"); ``` If you want to remove more than one event you can use ```removeEventListeners``` method with argument array with the names of the events. ``` -api.removeEventListeners(["incommingMessage", "outgoingMessageListener"]); +api.removeEventListeners(["incomingMessage", "outgoingMessageListener"]); ``` You can remove the embedded Jitsi Meet Conference with the following code: diff --git a/external_api.js b/external_api.js index 9bf7b08fe..968d1debe 100644 --- a/external_api.js +++ b/external_api.js @@ -139,7 +139,7 @@ var JitsiMeetExternalAPI = (function() * event and value - the listener. * Currently we support the following * events: - * incommingMessage - receives event notifications about incomming + * incomingMessage - receives event notifications about incoming * messages. The listener will receive object with the following structure: * {{ * "from": from,//JID of the user that sent the message @@ -185,7 +185,7 @@ var JitsiMeetExternalAPI = (function() /** * Adds event listeners to Meet Jitsi. Currently we support the following * events: - * incommingMessage - receives event notifications about incomming + * incomingMessage - receives event notifications about incoming * messages. The listener will receive object with the following structure: * {{ * "from": from,//JID of the user that sent the message diff --git a/muc.js b/muc.js index e4a32e4dc..0594613ee 100644 --- a/muc.js +++ b/muc.js @@ -239,10 +239,10 @@ Strophe.addConnectionPlugin('emuc', { if (txt) { console.log('chat', nick, txt); Chat.updateChatConversation(from, nick, txt); - if(APIConnector.isEnabled() && APIConnector.isEventEnabled("incommingMessage")) + if(APIConnector.isEnabled() && APIConnector.isEventEnabled("incomingMessage")) { if(from != this.myroomjid) - APIConnector.triggerEvent("incommingMessage", + APIConnector.triggerEvent("incomingMessage", {"from": from, "nick": nick, "message": txt}); } }