Skip to main content

Get open channel info

Retrieve information about an open channel, including participant count and channel status. Open channel information is returned as part of the enterChannel() response — there is no separate getChatroomInfo method.

Get open channel info when joining

Call enterChannel() to join the open channel. The result contains channel information:

TypeScript
import { OpenChannel } from '@nexconn/chat';

const channel = new OpenChannel('<open-channel-id>');
const result = await channel.enterChannel({ messageCount: 20 });
if (result.isOk) {
console.log('Member count:', result.data.memberCount);
console.log('Joined at:', result.data.enterTime);
console.log('Channel created at:', result.data.createTime);
console.log('Channel muted:', result.data.isAllChannelMuted);
console.log('Current user muted:', result.data.isCurrentUserMuted);
console.log('Current channel mute status:', result.data.isCurrentChannelMuted);
console.log('Current user in allowlist:', result.data.isCurrentChannelInAllowlist);
}

OpenChannelEnterResponseInfo fields

FieldTypeDescription
memberCountnumberTotal number of participants currently in the channel
enterTimenumberTimestamp when the current user joined
createTimenumberTimestamp when the channel was created
isAllChannelMutedbooleanWhether all participants in the channel are muted
isCurrentUserMutedbooleanWhether the current user is muted
isCurrentChannelMutedbooleanWhether the current user is muted in this channel
isCurrentChannelInAllowlistbooleanWhether the current user is in this channel's mute allowlist

The current user must successfully join the open channel to receive this information.