ChatConfig constructor

ChatConfig({
  1. ChatChannelAccessVerificationCallback? channelAccessVerification,
  2. bool allowUnauthenticatedUsers = false,
  3. bool postMessagesGlobally = false,
  4. Future<bool> onWillSendMessage(
    1. Session session,
    2. UserInfo userInfo,
    3. String channel
    )?,
  5. Future<void> onDidSendMessage(
    1. Session session,
    2. UserInfo userInfo,
    3. String channel
    )?,
})

Create a new ChatConfig.

Implementation

ChatConfig({
  ChatChannelAccessVerificationCallback? channelAccessVerification,
  this.allowUnauthenticatedUsers = false,
  this.postMessagesGlobally = false,
  this.onWillSendMessage,
  this.onDidSendMessage,
}) {
  this.channelAccessVerification =
      channelAccessVerification ?? (session, userId, channel) async => true;
}