Click or drag to resize
ChatRoomHelper Class
Helper class. Contains methods working only with chat rooms.
Inheritance Hierarchy
SystemObject
  CMS.ChatChatRoomHelper

Namespace: CMS.Chat
Assembly: CMS.Chat (in CMS.Chat.dll) Version: 9.0.0
Syntax
C#
public static class ChatRoomHelper

The ChatRoomHelper type exposes the following members.

Methods
  NameDescription
Public methodStatic memberConvertRoomToData(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
Public methodStatic memberConvertRoomToData(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
Public methodStatic memberConvertRoomToData(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.
Public methodStatic memberConvertRoomToData(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
Public methodStatic memberConvertRoomToDataAdminLevel
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;
Public methodStatic memberConvertRoomToDataRemoved
Makes ChatRoomData from information contained in ChatRoomInfo. If room is removed, its values are not set. Only RoomID and IsRemoved = true are returned.
Public methodStatic memberCreateClassicChatRoom
Creates classic (not one-to-one and not support) chat room.
Public methodStatic memberCreateIntiatedChatRoom
Creates new initiated chat room and inserts it into the database.
Public methodStatic memberCreateOneToOneChatRoom
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.
Public methodStatic memberCreateSupportChatRoom
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.
Public methodStatic memberCreateSupportChatRoomManual
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.
Public methodStatic memberDisableChatRoom
Disables chat room and refreshes cache.
Public methodStatic memberEnableChatRoom
Enables chat room and refreshes cache.
Public methodStatic memberGetRoomPasswordHash(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.
Public methodStatic memberGetRoomPasswordHash(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.
Public methodStatic memberChangeChatRoom(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.
Public methodStatic memberChangeChatRoom(Int32, String, Boolean, String, Boolean, String, NullableBoolean, String, Boolean)
Changes chat room. Properly handles changing from public to private state. Invalidates rooms cache.
Top
See Also