ChatService Methods |
The ChatService type exposes the following members.
Name | Description | |
---|---|---|
AcceptChatRequest |
Accepts initiated chat request.
| |
AcceptInvitation |
Accepts invitation:
- closes specified notification
- inserts user into room (joins)
- sends notification to sender about accepting invite
| |
AddAdmin |
Adds admin to the room. Only admin can do it.
| |
CloseAllNotifications |
Closes (markes as read) all notifications which belongs to online users and which were sent until untilWhen.
| |
CloseNotification |
Closes (markes as read) specified notification. This can be used to close generic notifications like InvitationDeclined or InvitationAccepted.
| |
CreateChatRoom |
Creates new chat room.
Current user have to join it manually after creating it.
Code name of this room will be: chatroom_{current_user_id}_{new_guid}
| |
CreateOneToOneChatRoom |
Creates new one-to-one chat room which will be accessible by current user and one more user (invited one).
Display name of new room will be: {nickname_current} - {nickname_invited}
Code name will be: adhoc_{id_lower}-{id_upper} ({id_lower} is the lower id of the two chat users, {id_upper} is the upper one).
A current user have to manually join this room after creating it.
If those two users have chatted before, the previously created room is returned. Code name is used to find previously created chat room.
| |
CreateSupportChatRoom |
Creates new support room. Support room is private room which can be accessed only by creator
and support. When creator writes to this room, support is notified.
| |
CreateSupportChatRoomManual |
Creates new support room. Support room is private room which can be accessed only by creator
and support. When creator writes to this room, support is notified.
This room does not have default greeting message, but messages passed as parameter.
| |
DeclineChatRequest |
Declines initiated chat request.
| |
DeclineInvitation |
Declines invitation:
- closes specified notification
- sends notification to sender about declining invite
| |
DeleteAdmin |
Deletes admin from the room. Only admin can do it.
| |
DeleteChatRoom |
Disables room. User has to be either Global admin, has ManageRooms permission or be creator/admin of this room.
| |
GetChatResponse(ChatResponseStatusEnum) |
Builds general chat response with error set to statusCode and message set to default value associated with statusCode.
(Inherited from ChatServiceBase.) | |
GetChatResponse(ChatResponseStatusEnum, String) |
Builds general chat response with error set to statusCode and message set to statusMessage.
(Inherited from ChatServiceBase.) | |
GetChatResponseTData(ChatResponseStatusEnum, String, TData) |
Builds generic ChatGeneral response with properties set to passed params.
(Inherited from ChatServiceBase.) | |
GetChatUserState |
Gets info about currently logged in chat user.
| |
GetOkChatResponse |
Builds general chat response with OK code.
(Inherited from ChatServiceBase.) | |
GetOkChatResponseTData(TData) |
Builds general chat response with OK code and Data set to data.
(Inherited from ChatServiceBase.) | |
GetPermissions |
Gets permissions of currently logged in user.
| |
GetSupportEngineersOnlineCount |
Gets count of currently logged in support engineers.
| |
ChangeChatRoom |
Changes existing chat room.
| |
ChangeMyNickname |
Changes nickname of currently logged in user.
| |
InviteToRoom |
Invites user to the chat room. Invitation is inserted into the second user's notifications. Second user can enter the room after accepting the invitation.
Current user has to have admin rights to the room to invite.
| |
JoinRoom |
Joins a room.
Chat user has to be logged in before this operation.
| |
KickUser |
Kicks a chat user from a room. Currently logged user must be an admin to kick another user.
| |
KickUserPermanently |
Kickes user permanently from a private room. If this room is public, it acts as a normal kick.
Kicked user won't be able to enter room again, unless he will be invited one more time.
| |
LeaveRoom |
Leaves chat room.
| |
LeaveRoomPermanently |
Permanently leaves current user from the private chat room (Join/Admin rights are removed from this room).
If room is not private, it acts as normale LeaveRoom().
| |
Logout |
Logouts chat user from chat (not CMSUser).
Leaves all rooms.
If CMSUser is logged in, this operation won't logout the chat user in reality.
| |
Ping |
Keeps user online in global list of chat online users (this method needs to be called periodically).
Checks if there were any changes in:
- rooms (new room added, changed name, etc.) since lastRoomsChange.
- counts of users in rooms since lastUsersInRoomsChange.
- global online users since lastOnlineUsersChange.
- notifications for online user since lastNotificationChange.
If any of this objects has changed, changes are send back to client.
If any of params is null, its objects are not checked. If param is 0, it is the first request and all objects are returned.
If user is not online on chat, only CurrentChatUserState will be returned and data (rooms, online users, etc.) will be null.
| |
PingInitiate |
Checks if there is new initiated chat request pending for this user and returns it. Returns null if there is nothing.
Requests are searched by ContactID and UserID.
| |
PingRoom | Keeping alive user in a room. User has to call this method every few seconds to let server know that he is still online. At the same time a new online users in a room and a new messages in a room are checked. Client sends the last time he made an update of online users (roomUsersLastChange) and messages (roomMessagesLastChange). If something new has happened since that time, the changes are sent back. | |
PostMessage |
Posts a new message to a room.
Chat user has to be logged in and joined this room. Message can not be empty.
| |
PostMessageToUser |
Posts a whisper message to user. This message will be posted to a room, but only sender and receiver of this messages will be able to see it.
| |
Register |
Registers new anonymous chat user. This new user is automatically logged in.
| |
RegisterGuest |
Registers new guest user (user with auto generated nickname).
| |
RejectMessage |
Rejects the message.
Checks for permissions for a specified room (roomID can be get from messageID) and if current chat user has
admin rights, it rejects the message.
| |
SearchOnlineUsers |
Search users who are online globally on a chat (they are performing Ping()) and meet condition (their nickname contains nickname.
| |
VerifyChatUserHasAdminRoomRights |
Verifies that currently logged in chat user has admin rights for a room.
Throws exception in case of failure and does nothing in case of success.
(Inherited from ChatServiceBase.) | |
VerifyChatUserHasAllPermissions |
Verifies that currently logged in chat user has all of the passed permissions.
Throws exception in case of failure and does nothing in case of success.
(Inherited from ChatServiceBase.) | |
VerifyChatUserHasAnyPermission |
Verifies that currently logged in chat user has at least one of the passed permissions.
Throws exception in case of failure and does nothing in case of success.
(Inherited from ChatServiceBase.) | |
VerifyChatUserHasPermission |
Verifies that currently logged in chat user has specified permission.
Throws exception in case of failure and does nothing in case of success.
(Inherited from ChatServiceBase.) | |
VerifyChatUserIsLoggedIn |
Verifies that chat user is logged in.
Throws exception in case of failure and does nothing in case of success.
(Inherited from ChatServiceBase.) | |
VerifyChatUserIsOnlineInARoom |
Verifies that currently logged in chat user is online in a room.
Throws exception in case of failure and does nothing in case of success.
(Inherited from ChatServiceBase.) | |
VerifyIPIsNotBanned |
Verifies that IP addres which was used to make this request is not banned.
Throws exception in case of failure and does nothing in case of success.
(Inherited from ChatServiceBase.) |
Name | Description | |
---|---|---|
AsValue |
Converts object to a query value which can be used as a query parameter
(Defined by QueryExtensions.) | |
GetAPIString |
Gets the string by the specified resource key
(Defined by CoreExtensions.) | |
GetString |
Gets the string by the specified resource key
(Defined by CoreExtensions.) | |
ToBoolean |
Returns the boolean representation of an object or default value if not.
(Defined by CoreExtensions.) | |
ToDateTime |
Returns the DateTime representation of an object or default value if not.
(Defined by CoreExtensions.) | |
ToDouble |
Returns the double representation of an object or default value if not.
(Defined by CoreExtensions.) | |
ToGuid |
Returns the Guid representation of an object or default value if not.
(Defined by CoreExtensions.) | |
ToInteger |
Returns the integer representation of an object or default value if not.
(Defined by CoreExtensions.) | |
ToString |
Returns the string representation of an object or default value if not.
(Defined by CoreExtensions.) |