Merge pull request #191 from nwittstruck/master
Fixed typo - incoming instead of incomming
This commit is contained in:
commit
1dab88e06a
|
@ -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,
|
||||
|
|
10
doc/api.md
10
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:
|
||||
|
|
|
@ -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
|
||||
|
|
4
muc.js
4
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});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue