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
|
* Maps the supported events and their status
|
||||||
* (true it the event is enabled and false if it is disabled)
|
* (true it the event is enabled and false if it is disabled)
|
||||||
* @type {{
|
* @type {{
|
||||||
* incommingMessage: boolean,
|
* incomingMessage: boolean,
|
||||||
* outgoingMessage: boolean,
|
* outgoingMessage: boolean,
|
||||||
* displayNameChange: boolean,
|
* displayNameChange: boolean,
|
||||||
* participantJoined: boolean,
|
* participantJoined: boolean,
|
||||||
|
@ -40,7 +40,7 @@ var APIConnector = (function () {
|
||||||
*/
|
*/
|
||||||
var events =
|
var events =
|
||||||
{
|
{
|
||||||
incommingMessage: false,
|
incomingMessage: false,
|
||||||
outgoingMessage:false,
|
outgoingMessage:false,
|
||||||
displayNameChange: false,
|
displayNameChange: false,
|
||||||
participantJoined: 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:
|
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:
|
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.
|
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({
|
api.addEventListeners({
|
||||||
incommingMessage: incommingMessageListener,
|
incomingMessage: incomingMessageListener,
|
||||||
outgoingMessage: outgoingMessageListener})
|
outgoingMessage: outgoingMessageListener})
|
||||||
```
|
```
|
||||||
|
|
||||||
If you want to remove a listener you can use ```removeEventListener``` method with argument the name of the event.
|
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
|
If you want to remove more than one event you can use ```removeEventListeners``` method with argument
|
||||||
array with the names of the events.
|
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:
|
You can remove the embedded Jitsi Meet Conference with the following code:
|
||||||
|
|
|
@ -139,7 +139,7 @@ var JitsiMeetExternalAPI = (function()
|
||||||
* event and value - the listener.
|
* event and value - the listener.
|
||||||
* Currently we support the following
|
* Currently we support the following
|
||||||
* events:
|
* events:
|
||||||
* incommingMessage - receives event notifications about incomming
|
* incomingMessage - receives event notifications about incoming
|
||||||
* messages. The listener will receive object with the following structure:
|
* messages. The listener will receive object with the following structure:
|
||||||
* {{
|
* {{
|
||||||
* "from": from,//JID of the user that sent the message
|
* "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
|
* Adds event listeners to Meet Jitsi. Currently we support the following
|
||||||
* events:
|
* events:
|
||||||
* incommingMessage - receives event notifications about incomming
|
* incomingMessage - receives event notifications about incoming
|
||||||
* messages. The listener will receive object with the following structure:
|
* messages. The listener will receive object with the following structure:
|
||||||
* {{
|
* {{
|
||||||
* "from": from,//JID of the user that sent the message
|
* "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) {
|
if (txt) {
|
||||||
console.log('chat', nick, txt);
|
console.log('chat', nick, txt);
|
||||||
Chat.updateChatConversation(from, nick, txt);
|
Chat.updateChatConversation(from, nick, txt);
|
||||||
if(APIConnector.isEnabled() && APIConnector.isEventEnabled("incommingMessage"))
|
if(APIConnector.isEnabled() && APIConnector.isEventEnabled("incomingMessage"))
|
||||||
{
|
{
|
||||||
if(from != this.myroomjid)
|
if(from != this.myroomjid)
|
||||||
APIConnector.triggerEvent("incommingMessage",
|
APIConnector.triggerEvent("incomingMessage",
|
||||||
{"from": from, "nick": nick, "message": txt});
|
{"from": from, "nick": nick, "message": txt});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue