init { channelState.flatMapLatest { it.channelConfig }.onEach { maxMessageLength = it.maxMessageLength commands = it.commands state.value = state.value.copy(hasCommands = commands.isNotEmpty()) }.launchIn(scope)  channelState.flatMapLatest { it.members }.onEach { members -> users = members.map { it.user } }.launchIn(scope)  channelState.flatMapLatest { it.channelData }.onEach { cooldownInterval = it.cooldown }.launchIn(scope)  setupComposerState() }
Sets up the data loading operations such as observing the maximum allowed message length.