Candy | Chats are not dead yet. |
© 2011 Amiado Group AG. All rights reserved. © 2012-2014 Patrick Stadler & Michael Weibel. All rights reserved.
action.js | |
Candy. | Chat Actions (basicly a abstraction of Jabber commands) |
Candy. | Jabber actions |
Functions | |
Version | Replies to a version request |
SetNickname | Sets the supplied nickname for all rooms (if parameter “room” is not specified) or sets it only for the specified rooms |
Roster | Sends a request for a roster |
Presence | Sends a request for presence |
Services | Sends a request for disco items |
Events | |
candy: | Triggered when no autojoin information has been found |
Functions | |
ResetIgnoreList | Create new ignore privacy list (and reset the previous one, if it exists). |
RemoveIgnoreList | Remove an existing ignore list. |
GetIgnoreList | Get existing ignore privacy list when connecting. |
SetIgnoreListActive | Set ignore privacy list active |
GetJidIfAnonymous | On anonymous login, initially we don’t know the jid and as a result, Candy.Core._user doesn’t have a jid. |
Candy. | Room-specific commands |
Functions | |
Join | Requests disco of specified room and joins afterwards. |
Leave | Leaves a room. |
Disco | Requests disco info of a room. |
Message | Send message |
Invite | Sends an invite stanza to multiple JIDs |
IgnoreUnignore | Checks if the user is already ignoring the target user, if yes: unignore him, if no: ignore him. |
UpdatePrivacyList | Updates privacy list according to the privacylist in the currentUser |
Candy. | Room administration commands |
Functions | |
UserAction | Kick or ban a user |
SetSubject | Sets subject (topic) of a room. |
Jabber actions
Functions | |
Version | Replies to a version request |
SetNickname | Sets the supplied nickname for all rooms (if parameter “room” is not specified) or sets it only for the specified rooms |
Roster | Sends a request for a roster |
Presence | Sends a request for presence |
Services | Sends a request for disco items |
Events | |
candy: | Triggered when no autojoin information has been found |
Functions | |
ResetIgnoreList | Create new ignore privacy list (and reset the previous one, if it exists). |
RemoveIgnoreList | Remove an existing ignore list. |
GetIgnoreList | Get existing ignore privacy list when connecting. |
SetIgnoreListActive | Set ignore privacy list active |
GetJidIfAnonymous | On anonymous login, initially we don’t know the jid and as a result, Candy.Core._user doesn’t have a jid. |
Room-specific commands
Functions | |
Join | Requests disco of specified room and joins afterwards. |
Leave | Leaves a room. |
Disco | Requests disco info of a room. |
Message | Send message |
Invite | Sends an invite stanza to multiple JIDs |
IgnoreUnignore | Checks if the user is already ignoring the target user, if yes: unignore him, if no: ignore him. |
UpdatePrivacyList | Updates privacy list according to the privacylist in the currentUser |
Disco: function( roomJid )
Requests disco info of a room.
(String) roomJid | Room to get info for |
Message: function( roomJid, msg, type, xhtmlMsg )
Send message
(String) roomJid | Room to which send the message into |
(String) msg | Message |
(String) type | ”groupchat” or “chat” (“chat” is for private messages) |
(String) xhtmlMsg | XHTML formatted message [optional] |
(Boolean) | true if message is not empty after trimming, false otherwise. |
Invite: function( roomJid, invitees, reason, password )
Sends an invite stanza to multiple JIDs
(String) roomJid | Room to which send the message into |
(Array) invitees | Array of JIDs to be invited to the room |
(String) reason | Message to include with the invitation [optional] |
(String) password | Password for the MUC, if required [optional] |
Room administration commands
Functions | |
UserAction | Kick or ban a user |
SetSubject | Sets subject (topic) of a room. |
Replies to a version request
Version: function( msg )
Sets the supplied nickname for all rooms (if parameter “room” is not specified) or sets it only for the specified rooms
SetNickname: function( nickname, rooms )
Sends a request for a roster
Roster: function()
Sends a request for presence
Presence: function( attr, el )
Sends a request for disco items
Services: function()
Create new ignore privacy list (and reset the previous one, if it exists).
ResetIgnoreList: function()
Remove an existing ignore list.
RemoveIgnoreList: function()
Get existing ignore privacy list when connecting.
GetIgnoreList: function()
Set ignore privacy list active
SetIgnoreListActive: function()
On anonymous login, initially we don’t know the jid and as a result, Candy.Core._user doesn’t have a jid.
GetJidIfAnonymous: function()
Requests disco of specified room and joins afterwards.
Join: function( roomJid, password )
Leaves a room.
Leave: function( roomJid )
Requests disco info of a room.
Disco: function( roomJid )
Send message
Message: function( roomJid, msg, type, xhtmlMsg )
Sends an invite stanza to multiple JIDs
Invite: function( roomJid, invitees, reason, password )
Checks if the user is already ignoring the target user, if yes: unignore him, if no: ignore him.
IgnoreUnignore: function( userJid )
Updates privacy list according to the privacylist in the currentUser
UpdatePrivacyList: function()
Kick or ban a user
UserAction: function( roomJid, userJid, type, reason )
Sets subject (topic) of a room.
SetSubject: function( roomJid, subject )