onSendMessageForUserDisableChanged method

void onSendMessageForUserDisableChanged(
  1. String roomId,
  2. String userId,
  3. bool isDisable
)

Implementation

void onSendMessageForUserDisableChanged(String roomId, String userId, bool isDisable) {
  final liveID = LiveListStore.shared.liveState.currentLive.value.liveID;
  if (roomId == liveID && userId == TUIRoomEngine.getSelfInfo().userId) {
    final toast = isDisable
        ? LiveKitLocalizations.of(Global.appContext())!.common_client_error_send_message_disabled_for_current
        : LiveKitLocalizations.of(Global.appContext())!.common_send_message_enable;
    context.toastSubject.target?.add(toast);
  }
}