setActiveRoomIntent method
Implementation
@override
SubscriptionIntent? setActiveRoomIntent(RoomChannel? channel) {
if (_activeRoomChannelName != null) {
_intents.remove(_activeRoomChannelName);
_activeRoomChannelName = null;
}
if (channel == null) return null;
final channelName = channel.toChannelString();
final intent = SubscriptionIntent(
kind: IntentKind.room,
channel: channel,
channelName: channelName,
);
_intents[channelName] = intent;
_activeRoomChannelName = channelName;
return intent;
}