Skip to main content

Get open channel info

Open channel information — including member count, creation time, and mute status — is returned in the NCOpenChannelEnterResponseInfo object when you call enterChannel(params:completion:).

tip

Rate limit: Per device, up to 1 call per second and at most 20 calls per minute.

swift
import NexconnChatSDK

guard let channel = OpenChannel(channelId: "channelId") else {
return
}

let params = EnterOpenChannelParams()
params.messageCount = 20

channel.enterChannel(params: params) { response, error in
if let error {
print("Failed: \(error.localizedDescription)")
return
}

guard let response else { return }
print("Channel ID: \(channel.channelId)")
print("Total members: \(response.memberCount)")
print("Created at: \(response.createTime) ms")
print("All members muted: \(response.isAllChannelMuted)")
print("Current user muted in this channel: \(response.isCurrentChannelMuted)")
}

NCOpenChannelEnterResponseInfo properties

PropertyTypeDescription
createTimeint64Channel creation time (millisecond timestamp)
memberCountNSIntegerCurrent member count
enterTimeint64Current user's join time (millisecond timestamp)
isAllChannelMutedBOOLWhether the entire channel is muted
isCurrentUserMutedBOOLWhether the current user is globally muted
isCurrentChannelMutedBOOLWhether the current user is muted in this channel
isCurrentChannelInAllowlistBOOLWhether the current user is on the mute allowlist