clj-symphony.chat
Operations related to ‘chats’. A ‘chat’ may contain 2 or more participants from 1 or 2 pods, and are different to rooms in that their membership is fixed at creation time.
chat
(chat c ch)Returns a chat as a map (see chatobj->map for details) for the given chat identifier. Returns nil if the chat doesn’t exist.
chatobj
multimethod
(chatobj c ch)Returns a org.symphonyoss.client.model.Chat object for the given chat identifier (a org.symphonyoss.client.model.Chat object, stream id, or map containing a :stream-id). Returns nil if the chat doesn’t exist.
chatobj->map
(chatobj->map ch)Converts a org.symphonyoss.client.model.Chat object into a map with these keys:
| Key | Description |
|---|---|
:stream-id |
The stream id of the chat. |
:last-message |
The last message sent to the chat, as a map (see clj-symphony.message/msgobj->map for details). |
:other-users |
A sequence of maps representing the other users in the chat (see clj-symphony.user/userobj->map for details). |
chatobjs
(chatobjs c)(chatobjs c u)Returns all org.symphonyoss.client.model.Chat objects for the given user. If no user identifier is provided, returns the chats of the authenticated connection user.
chats
(chats c)(chats c u)Returns all chats for the given user, as a sequence of maps (see chatobj->map for details). If no user identifier is provided, returns the chats of the authenticated connection user.
start-chat!
(start-chat! c u)Starts an :IM or :MIM chat with the specified user(s), returning the new chat as a map (see chatobj->map for details). Users are identified as described in clj-symphony.user/userobj, and can either be a single item or a sequence or set of such items.
start-chatobj!
(start-chatobj! c u)Starts an :IM or :MIM chat with the specified user(s), returning the new org.symphonyoss.client.model.Chat object. Users are identified as described in clj-symphony.user/userobj, and can either be a single item or a sequence or set of such items.
stop-chat!
(stop-chat! c ch)Stops a chat and returns true if the chat was successfully stopped, nil if the chat was invalid.
stop-chatobj!
(stop-chatobj! c ch)Stops a chat. Returns true if the chat was successfully stopped.