ThreadMessagesViewController constructor

ThreadMessagesViewController({
  1. MessageModel? model,
  2. Message? willSendHandler(
    1. Message
    )?,
  3. int pageSize = 10,
})

Implementation

ThreadMessagesViewController({
  this.model,
  this.willSendHandler,
  this.pageSize = 10,
}) {
  ChatUIKit.instance.addObserver(this);
  if (ChatUIKit.instance.currentUserId != null) {
    if (ChatUIKitProvider.instance.currentUserProfile != null) {
      userMap[ChatUIKit.instance.currentUserId!] =
          ChatUIKitProvider.instance.currentUserProfile!;
    }
  }
  thread ??= model?.thread;
  joinThreadIfCan();
  updatePermission();
}