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
| Field | Type | Description |
|---|---|---|
memberCount | number | Total number of participants currently in the channel |
enterTime | number | Timestamp when the current user joined |
createTime | number | Timestamp when the channel was created |
isAllChannelMuted | boolean | Whether all participants in the channel are muted |
isCurrentUserMuted | boolean | Whether the current user is muted |
isCurrentChannelMuted | boolean | Whether the current user is muted in this channel |
isCurrentChannelInAllowlist | boolean | Whether the current user is in this channel's mute allowlist |
The current user must successfully join the open channel to receive this information.