-
Notifications
You must be signed in to change notification settings - Fork 11
Events 1.66.1
Kind: global class
Emits: rainbow_onmessageserverreceiptreceived
, rainbow_onmessagereceiptreceived
, rainbow_onmessagereceiptreadreceived
, rainbow_onmessagereceived
, rainbow_onsendmessagefailed
, rainbow_oncontactpresencechanged
, rainbow_onpresencechanged
, rainbow_onconversationremoved
, rainbow_onconversationchanged
, rainbow_onallmessagedremovedfromconversationreceived
, rainbow_onchatstate
, rainbow_oncontactinformationchanged
, rainbow_onuserinvitereceived
, rainbow_onuserinviteaccepted
, rainbow_onuserinvitecanceled
, rainbow_onbubbleaffiliationchanged
, rainbow_onbubbleownaffiliationchanged
, rainbow_onbubbleinvitationreceived
, Events#event:rainbow_onbubblecustomDatachanged
, rainbow_onbubbletopicchanged
, rainbow_onbubbleprivilegechanged
, rainbow_onbubbleavatarchanged
, rainbow_onbubblenamechanged
, rainbow_ongroupcreated
, rainbow_ongroupdeleted
, rainbow_ongroupupdated
, rainbow_onuseraddedingroup
, rainbow_onuserremovedfromgroup
, rainbow_onstarted
, rainbow_onstopped
, rainbow_onready
, rainbow_onerror
, rainbow_onconnected
, rainbow_onconnectionerror
, rainbow_ondisconnected
, rainbow_onreconnecting
, rainbow_onfailed
, rainbow_oncallupdated
, rainbow_onconferenced
, rainbow_ontelephonystatuschanged
, rainbow_onnomadicstatusevent
, rainbow_onvoicemessageupdated
, rainbow_oncallforwarded
, rainbow_onchannelmessagereceived
, rainbow_onchannelmessagedeletedreceived
, rainbow_onprofilefeatureupdated
, rainbow_onfilecreated
, rainbow_onfileupdated
, rainbow_onfiledeleted
, rainbow_onthumbnailcreated
, rainbow_onchannelupdated
, rainbow_onchannelusersubscription
, rainbow_onmediapropose
, rainbow_oncalllogupdated
, rainbow_oncalllogackupdated
, rainbow_onfavoritecreated
, rainbow_onfavoritedeleted
-
Events
- new Events()
-
.on(event, callback) ⇒
Object
-
.once(event, callback) ⇒
Object
- "rainbow_onmessageserverreceiptreceived" (receipt)
- "rainbow_onmessagereceiptreceived" (receipt)
- "rainbow_onmessagereceiptreadreceived" (receipt)
- "rainbow_onmessagereceived" (message)
- "rainbow_onsendmessagefailed" (message)
- "rainbow_oncontactpresencechanged" (contact)
- "rainbow_onpresencechanged" (presence)
- "rainbow_onconversationremoved" (conversation)
- "rainbow_onconversationchanged" (conversation)
- "rainbow_onallmessagedremovedfromconversationreceived" (conversation)
- "rainbow_onchatstate" (chatstate)
- "rainbow_oncontactinformationchanged" (contact)
- "rainbow_onuserinvitereceived" (invitation)
- "rainbow_onuserinviteaccepted" (invitation)
- "rainbow_onuserinvitecanceled" (invitation)
- "rainbow_onbubbleaffiliationchanged" (bubble)
- "rainbow_onbubblepresencechanged" (bubble)
- "rainbow_onbubbleownaffiliationchanged" (bubble)
- "rainbow_onbubbledeleted" (bubble)
- "rainbow_onbubbleinvitationreceived" (bubble)
- "rainbow_onbubblecustomdatachanged" (bubble)
- "rainbow_onbubbletopicchanged" (bubble)
- "rainbow_onbubbleprivilegechanged" (bubble)
- "rainbow_onbubbleavatarchanged" (bubble)
- "rainbow_onbubblenamechanged" (bubble)
- "rainbow_ongroupcreated" (group)
- "rainbow_ongroupdeleted" (group)
- "rainbow_ongroupupdated" (group)
- "rainbow_onuseraddedingroup" (group, contact)
- "rainbow_onuserremovedfromgroup" (group, contact)
- "rainbow_onchannelmessagereceived" (message)
- "rainbow_onchannelmessagedeletedreceived" (message)
- "rainbow_onprofilefeatureupdated"
- "rainbow_oncallupdated"
- "rainbow_onconferenced"
- "rainbow_ontelephonystatuschanged"
- "rainbow_onnomadicstatusevent"
- "rainbow_onvoicemessageupdated"
- "rainbow_oncallforwarded"
- "rainbow_onfilecreated"
- "rainbow_onfileupdated"
- "rainbow_onfiledeleted"
- "rainbow_onthumbnailcreated"
- "rainbow_onchannelupdated" (id, kind)
- "rainbow_onchannelusersubscription" (id, userId, kind)
- "rainbow_onmediapropose" (infos)
- "rainbow_oncalllogupdated" (calllogs)
- "rainbow_oncalllogackupdated" (id)
- "rainbow_onfavoritecreated" (favorite)
- "rainbow_onfavoritedeleted" (favorite)
- "rainbow_onxmpperror" (error)
- "rainbow_onstarted" (status)
- "rainbow_onstopped" (status)
- "rainbow_onconnected" (status)
- "rainbow_onconnectionerror" (status)
- "rainbow_ondisconnected" (status)
- "rainbow_onreconnecting" (status)
- "rainbow_onfailed" (status)
- "rainbow_onready" (status)
- "rainbow_onerror" (error)
This module fires every events that come from Rainbow.
To receive them, you need to subscribe individually to each of the following events
Subscribe to an event
Kind: instance method of Events
Returns: Object
- The events instance to be able to chain subscriptions
Access: public
Param | Type | Description |
---|---|---|
event | string |
The event name to subscribe |
callback | function |
The function called when the even is fired |
Subscribe to an event only one time (fired only the first time)
Kind: instance method of Events
Returns: Object
- The events instance to be able to chain subscriptions
Access: public
Param | Type | Description |
---|---|---|
event | string |
The event name to subscribe |
callback | function |
The function called when the even is fired |
Fired when the message has been received by the server
Kind: event emitted by Events
Access: public
Param | Type | Description |
---|---|---|
receipt | Object |
The receipt received by the server |
receipt.event | string |
The type of receipt. Can be read or received . Should be received in that case |
receipt.entity | string |
The entity who sent the receipt. Can be server or client . Should be server in that case |
receipt.type | string |
The type of the message. Can be chat or groupchat . |
receipt.id | string |
The id of the message sent (linked to that receipt) |
Fired when the message has been received by the recipient
Kind: event emitted by Events
Access: public
Param | Type | Description |
---|---|---|
receipt | Object |
The receipt received by the server |
receipt.event | string |
The type of receipt. Can be read or received . Should be received in that case |
receipt.entity | string |
The entity who sent the receipt. Can be server or client . Should be client in that case |
receipt.type | string |
The type of the message. Can be chat or groupchat
|
receipt.id | string |
The id of the message sent (linked to that receipt) |
receipt.fromJid | string |
The Bare JID of the recipient who sent this receipt, |
receipt.resource | string |
The resource JID of the recipient who sent this receipt |
Fired when the message has been read by the recipient
Kind: event emitted by Events
Access: public
Param | Type | Description |
---|---|---|
receipt | Object |
The receipt received by the server |
receipt.event | string |
The type of receipt. Can be read or received . Should be read in that case |
receipt.entity | string |
The entity who sent the receipt. Can be server or client . Should be client in that case |
receipt.type | string |
The type of the message. Can be chat or groupchat
|
receipt.id | string |
The id of the message sent (linked to that receipt) |
receipt.fromJid | string |
The Bare JID of the recipient who sent this receipt, |
receipt.resource | string |
The resource JID of the recipient who sent this receipt |
Fired when a chat message is received (in a one-to-one conversation or in a Bubble conversation)
Kind: event emitted by Events
Access: public
Param | Type | Description |
---|---|---|
message | Message |
The message received |
Fired when a chat message with no-store attribut sent has failed.
Kind: event emitted by Events
Access: public
Param | Type | Description |
---|---|---|
message | Message |
The message which failed to be sent. |
Fired when the presence of a contact changes
Kind: event emitted by Events
Access: public
Param | Type | Description |
---|---|---|
contact | Contact |
The contact |
This event is fired when the presence of the connected user changes
status may be
+ "unknow",
+ "online" (with message "" | "mode=auto"),
+ "away" (with message "" ),
+ "xa" (with message ""| "away"),
+ "dnd" (with message "" | "audio" | "video" | "sharing" | "presentation")
This event is also a confirmation from the server that the new presence value has been set
Kind: event emitted by Events
Access: public
Param | Type | Description |
---|---|---|
presence | Object |
The presence object updated (jid, status, message, stamp) |
This event is fired when a conversation has been removed
Kind: event emitted by Events
Access: public
Param | Type | Description |
---|---|---|
conversation | Object |
The conversation object |
conversation.conversationId | String |
Conversation identifier |
This event is fired when a conversation has changed
Kind: event emitted by Events
Access: public
Param | Type | Description |
---|---|---|
conversation | Conversation |
The conversation |
This event is fired when a conversation has changed
Kind: event emitted by Events
Access: public
Param | Type | Description |
---|---|---|
conversation | Conversation |
The conversation where the messages as all been removed. |
This event is fired when a chatstate event occurs
Kind: event emitted by Events
Access: public
Param | Type | Description |
---|---|---|
chatstate | Object |
The chatstate |
This event is fired when a conversation has been removed
Kind: event emitted by Events
Access: public
Param | Type | Description |
---|---|---|
contact | Contact |
The contact |
Fired when an user invitation is received
Kind: event emitted by Events
Access: public
Param | Type | Description |
---|---|---|
invitation | Invitation |
The invitation received |
Fired when an user invitation is accepted
Kind: event emitted by Events
Access: public
Param | Type | Description |
---|---|---|
invitation | Invitation |
The invitation accepted |
Fired when an user invitation is canceled
Kind: event emitted by Events
Access: public
Param | Type | Description |
---|---|---|
invitation | Invitation |
The invitation canceled |
Fired when a user changes his affiliation with a bubble
Kind: event emitted by Events
Access: public
Param | Type | Description |
---|---|---|
bubble | Bubble |
The bubble updated |
Fired when a presence changes is a user connected bubble
Kind: event emitted by Events
Access: public
Param | Type | Description |
---|---|---|
bubble | Bubble |
The bubble updated |
Fired when a user changes the user connected affiliation with a bubble
Kind: event emitted by Events
Access: public
Param | Type | Description |
---|---|---|
bubble | Bubble |
The bubble updated |
Fired when a user deletes a bubble the user is affiliated to
Kind: event emitted by Events
Access: public
Param | Type | Description |
---|---|---|
bubble | Bubble |
The bubble deleted |
Fired when an invitation to join a bubble is received
Kind: event emitted by Events
Access: public
Param | Type | Description |
---|---|---|
bubble | Bubble |
The invitation bubble |
Fired when the custom data of a bubble has changed
Kind: event emitted by Events
Access: public
Param | Type | Description |
---|---|---|
bubble | Bubble |
The bubble updated with the new custom data set |
Fired when the topic of a bubble has changed
Kind: event emitted by Events
Access: public
Param | Type | Description |
---|---|---|
bubble | Bubble |
The bubble updated with the new topic set |
Fired when the privilage of a bubble has changed
Kind: event emitted by Events
Access: public
Param | Type | Description |
---|---|---|
bubble | Object |
The bubble updated with the new privilege set privilege The privilege updated (Can be moderator, user, owner) |
Fired when the avatar of a bubble has changed
Kind: event emitted by Events
Access: public
Param | Type | Description |
---|---|---|
bubble | Bubble |
The bubble updated with a new avatar |
Fired when the name of a bubble has changed
Kind: event emitted by Events
Access: public
Param | Type | Description |
---|---|---|
bubble | Bubble |
The bubble updated with the new name set |
Fired when a group is created
Kind: event emitted by Events
Access: public
Param | Type | Description |
---|---|---|
group | Group |
The created group |
Fired when a group is deleted
Kind: event emitted by Events
Access: public
Param | Type | Description |
---|---|---|
group | Group |
The deleted group |
Fired when a group is updated
Kind: event emitted by Events
Access: public
Param | Type | Description |
---|---|---|
group | Group |
The updated group |
Fired when a user is added in a group
Kind: event emitted by Events
Access: public
Param | Type | Description |
---|---|---|
group | Group |
The group where the user is added |
contact | Contact |
The user added |
Fired when a user is removed from a group
Kind: event emitted by Events
Access: public
Param | Type | Description |
---|---|---|
group | Group |
The group where the user is removed |
contact | Contact |
The user removed |
Fired when a message is received from a channel
Kind: event emitted by Events
Access: public
Param | Type | Description |
---|---|---|
message | ChannelMessage |
The message received |
Fired when a message is received from a channel
Kind: event emitted by Events
Access: public
Param | Type | Description |
---|---|---|
message | messageId |
The id of the deleted message received |
Fired when a profile feature updated event is received
Kind: event emitted by Events
Access: public
|
Fired when a call event is received
Kind: event emitted by Events
Access: public
Type |
--- |data
|
Fired when a conference event is received
Kind: event emitted by Events
Access: public
Type |
--- |data
|
Fired when status of the telephony service event is received
Kind: event emitted by Events
Access: public
Type |
--- |data
|
Fired for nomadic of the telephony event
Kind: event emitted by Events
Access: public
Type |
--- |data
|
Fired when a voice message updated event is received
Kind: event emitted by Events
Access: public
Type |
--- |data
|
Fired when a call forwarded event is received
Kind: event emitted by Events
Access: public
Type |
--- |data
|
Fired when a file created event is received
Kind: event emitted by Events
Access: public
Type |
--- |data
|
Fired when a file updated event is received
Kind: event emitted by Events
Access: public
Type |
--- |data
|
Fired when a file deleted event is received
Kind: event emitted by Events
Access: public
Type |
--- |data
|
Fired when a thumbnail created event is received
Kind: event emitted by Events
Access: public
Type |
--- |data
|
Fired when a channel update event is received
Kind: event emitted by Events
Access: public
Param | Type | Description |
---|---|---|
id | String |
The id of the channel |
kind | Number |
The kind of change (ADD: 0, UPDATE: 1, REMOVE: 2, SUBSCRIBE: 4, UNSUBSCRIBE: 5) |
Fired when a user channel subscription event is received
Kind: event emitted by Events
Access: public
Param | Type | Description |
---|---|---|
id | String |
The id of the channel |
userId | String |
The id of the user |
kind | Number |
The kind of change (SUBSCRIBE: 4, UNSUBSCRIBE: 5) |
Fired when received an event of propose for media.
Kind: event emitted by Events
Access: public
Param | Type | Description |
---|---|---|
infos | Object |
about the proposed for media : { Contact } infos about the contact who proposed for media { media } infos about media for the proposed event. |
Fired when the calllog is updated
Kind: event emitted by Events
Access: public
Param | Type | Description |
---|---|---|
calllogs | Object |
The callogs of the user |
Fired when the number of ack of calllog changes
Kind: event emitted by Events
Access: public
Param | Type | Description |
---|---|---|
id | Object |
The calllog of the user |
Fired when a favorite is added to the loggued in user.
Kind: event emitted by Events
Access: public
Param | Type | Description |
---|---|---|
favorite | Favorite |
The favorite created |
Fired when a favorite is suppressed to the loggued in user.
Kind: event emitted by Events
Access: public
Param | Type | Description |
---|---|---|
favorite | Favorite |
The favorite deleted |
Fired when an XMPP Error events happens.
Kind: event emitted by Events
Access: public
Param | Type | Description |
---|---|---|
error | Object |
xmpp received. |
Fired when the SDK has successfully started (not yet signed in)
Kind: event emitted by Events
Access: public
Param | Type | Description |
---|---|---|
status | Object |
The event status |
Fired when the SDK has been successfully stopped (all services have been stopped)
Kind: event emitted by Events
Access: public
Param | Type | Description |
---|---|---|
status | Object |
The event status |
Fired when the connection is successfull with Rainbow (signin complete)
Kind: event emitted by Events
Access: public
Param | Type | Description |
---|---|---|
status | Object |
The event status |
Fired when the connection can't be done with Rainbow (ie. issue on sign-in)
Kind: event emitted by Events
Access: public
Param | Type | Description |
---|---|---|
status | Object |
The event status |
Fired when the SDK lost the connection with Rainbow
Kind: event emitted by Events
Access: public
Param | Type | Description |
---|---|---|
status | Object |
The event status |
Fired when the SDK tries to reconnect
Kind: event emitted by Events
Access: public
Param | Type | Description |
---|---|---|
status | Object |
The event status |
Fired when the SDK didn't succeed to reconnect and stop trying
Kind: event emitted by Events
Access: public
Param | Type | Description |
---|---|---|
status | Object |
The event status |
Fired when the SDK is connected to Rainbow and ready to be used
Kind: event emitted by Events
Access: public
Param | Type | Description |
---|---|---|
status | Object |
The event status |
Fired when something goes wrong (ie: bad 'configurations' parameter...). Used by application to stop, start the sdk again.
Kind: event emitted by Events
Access: public
Param | Type | Description |
---|---|---|
error | Object |
The error received |