OpenChannel

open class OpenChannel: BaseChannel

The OpenChannel class represents a open channel which is a public chat.

Any users who wants to enter the channel can join freely. This class is derived from BaseChannel. If the OpenChannelDelegate is added, the user will automatically receive all messages from the channels where the user belongs after connection. The OpenChannel does not provide the features that GroupChannel does, but it can handle much more users.

For more information, see Group Channel.

  • The number of participants in this channel.

    Declaration

    Swift

    open internal(set) var participantCount: Int = 0
  • The operators of this channel.

    Declaration

    Swift

    open internal(set) var operators: [User]?
  • Returns the user is an operator or not.

    Declaration

    Swift

    open func isOperator(user: User) -> Bool

    Parameters

    user

    The user object.

    Return Value

    If true, the user is an operator.

  • Returns the user ID is an operator or not.

    Declaration

    Swift

    open func isOperator(userId: String) -> Bool

    Parameters

    userId

    The user ID.

    Return Value

    If true, the user ID is an operator.

  • Default constructor.

    Declaration

    Swift

    public required init(from decoder: Decoder) throws

    Parameters

    decoder

    Decoder instance

  • Encodes this object.

    Declaration

    Swift

    open override func encode(to encoder: Encoder) throws

    Parameters

    encoder

    Encoder instance

  • Compares this object with given other object.

    Declaration

    Swift

    public override func isEqual(_ object: Any?) -> Bool

    Parameters

    object

    Any instance

    Return Value

    true if same otherwise false

CRUD

Operation

Query