ChatRoomHelper Class |
Namespace: CMS.Chat
public static class ChatRoomHelper
The ChatRoomHelper type exposes the following members.
Name | Description | |
---|---|---|
ChangeChatRoom(Int32, String, Boolean, String, Boolean, String, Boolean) |
Changes chat room.
Properly handles changing from public to private state.
Invalidates rooms cache.
Properties ChatRoomIsSupport and ChatRoomName are not changed.
| |
ChangeChatRoom(Int32, String, Boolean, String, Boolean, String, NullableBoolean, String, Boolean) |
Changes chat room.
Properly handles changing from public to private state.
Invalidates rooms cache.
| |
ConvertRoomToData(ChatRoomInfo) |
Makes ChatRoomData from information contained in ChatRoomInfo. User is considered as non anonymous here.
Property IsRemoved is set based on:
- if room is disabled, IsRemoved is true
- if user is anonymous and room does not allow anonymous users, IsRemoved is set to true
- otherwise it is set to false
| |
ConvertRoomToData(RoomState) |
Makes ChatRoomData from information contained in ChatRoomInfo. User is considered as non anonymous here.
Property IsRemoved is set based on:
- if room is disabled, IsRemoved is true
- if user is anonymous and room does not allow anonymous users, IsRemoved is set to true
- otherwise it is set to false
| |
ConvertRoomToData(ChatRoomInfo, Boolean) |
Makes ChatRoomData from information contained in ChatRoomInfo.
Property IsRemoved is set based on:
- if room is disabled, IsRemoved is true
- if user is anonymous and room does not allow anonymous users, IsRemoved is set to true
- otherwise it is set to false
If room is removed, its values are not set. Only RoomID and IsRemoved = true are returned.
| |
ConvertRoomToData(RoomState, Boolean) |
Makes ChatRoomData from information contained in ChatRoomInfo.
Property IsRemoved is set based on:
- if room is disabled, IsRemoved is true
- if user is anonymous and room does not allow anonymous users, IsRemoved is set to true
- otherwise it is set to false
| |
ConvertRoomToDataAdminLevel |
Makes ChatRoomData from information contained in ChatRoomInfo.
If room is removed, its values are not set. Only RoomID and IsRemoved = true are returned.
Returns null if roomState is null;
| |
ConvertRoomToDataRemoved |
Makes ChatRoomData from information contained in ChatRoomInfo.
If room is removed, its values are not set. Only RoomID and IsRemoved = true are returned.
| |
CreateClassicChatRoom |
Creates classic (not one-to-one and not support) chat room.
| |
CreateIntiatedChatRoom |
Creates new initiated chat room and inserts it into the database.
| |
CreateOneToOneChatRoom |
Creates one-to-one chat room and inserts it into the DB. If room already exists, the old one is returned.
Invitation is send to secondChatUser and both users get 'Join' rights to this room.
| |
CreateSupportChatRoom |
Creates support room. Support room is private, marked as IsSupport, so new messages will be send to online support engineers.
Support greeting system message is automatically inserted (the default one) if the room is newly created.
| |
CreateSupportChatRoomManual |
Creates support room. Support room is private, marked as IsSupport, so new messages will be send to online support engineers.
If parameter greetingMessages is null, the default support greeting message (ChatMessageTypeEnum.SupportGreeting) will be inserted. But only if the room did not exist before.
| |
DisableChatRoom |
Disables chat room and refreshes cache.
| |
EnableChatRoom |
Enables chat room and refreshes cache.
| |
GetRoomPasswordHash(String, Guid) |
Combines plain text password with salt (GUID converted to string) and returns its hash.
If plainText is null, it returns null. If it is empty string it retuns empty string.
| |
GetRoomPasswordHash(String, String) |
Combines plain text password with salt and returns its hash.
If plainText is null, it returns null. If it is empty string it retuns empty string.
|