| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Manages chat conversations for a given connection.
| Field Summary | |
object
|
chats
An array of Chat objects. |
boolean
|
options.ignoreResource
only applies to finding chats. |
boolean
|
options.ignoreThread
only applies to finding chats. |
| Constructor Summary | |
Xmpp4Js.Chat.ChatManager(con)
Automatically registers events on connection. |
|
| Method Summary | |
|
closeChat(chat)
Closes a given chat, and sends events. |
|
createChat(jid, listener, )
Creates a new chat and returns it, and fires the chatStarted event. |
Xmpp4Js.Chat.Chat
|
findBestChat(msg, isOutgoing, ignoreResource)
Get or return a Chat object using a given message. |
|
getConnection()
The connection that this ChatManager is associated with. |
|
getOptions()
Get options associated with this ChatManager. |
|
getThreadChat(thread)
Returns a chat by thread ID |
|
getUserChat(jid)
Gets a chat by Jid |
|
setOptions(options)
Set options. |
| Field Detail |
object chats
boolean options.ignoreResource
boolean options.ignoreThread
| Constructor Detail |
Xmpp4Js.Chat.ChatManager(con)
Xmpp4Js.JabberConnection con
- The connection object to associate with.
| Method Detail |
closeChat(chat)
Xmpp4Js.Chat.Chat chat
- The chat object to close
createChat(jid, listener, )
Jid jid
Function listener
- (String) thread
Xmpp4Js.Chat.Chat
Xmpp4Js.Chat.Chat findBestChat(msg, isOutgoing, ignoreResource)
Xmpp4Js.Packet.Message msg
- A message stanza to determine.
Boolean isOutgoing
- If true use toJid, else fromJid
Boolean ignoreResource
- Resort to ignoring the resource if needed (last attempt).
Xmpp4Js.Chat.Chat The end result of the chat finding.
getConnection()
Xmpp4Js.JabberConnection
getOptions()
Map
getThreadChat(thread)
String thread
Xmpp4Js.Chat.Chat
getUserChat(jid)
Xmpp4Js.Jid jid
- Jid object or string.
Xmpp4Js.Chat.Chat
setOptions(options)
Map options