ChatConfig class

Configuration for the server part of the chat module.

Constructors

ChatConfig({ChatChannelAccessVerificationCallback? channelAccessVerification, bool allowUnauthenticatedUsers = false, bool postMessagesGlobally = false, Future<bool> onWillSendMessage(Session session, UserInfo userInfo, String channel)?, Future<void> onDidSendMessage(Session session, UserInfo userInfo, String channel)?})
Create a new ChatConfig.

Properties

allowUnauthenticatedUsers bool
Allow users to chat even though they aren't signed in.
final
channelAccessVerification ChatChannelAccessVerificationCallback
Callback for verifying if a user is allowed to join a channel. Return true if the user is allowed to join the channel.
latefinal
hashCode int
The hash code for this object.
no setterinherited
onDidSendMessage Future<void> Function(Session session, UserInfo userInfo, String channel)?
Callback for when a message has been sent to a user.
final
onWillSendMessage Future<bool> Function(Session session, UserInfo userInfo, String channel)?
Callback for when a message is about to be sent to a user. Return false to prevent the message from being sent.
final
postMessagesGlobally bool
Post messages globally in the server cluster (i.e. use Redis).
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

current ChatConfig
Gets the current Auth module configuration.
no setter

Static Methods

set(ChatConfig config) → void
Updates the configuration used by the Auth module.