MessageListParams

@objc(SBDMessageListParams)
public class MessageListParams : NSObject, NSCopying

An object contains set of options for get message methods

Since

3.0.181
  • The number of messages to retrieve that were sent before the specified timestamp or message ID. Default is 20

    Declaration

    Swift

    @objc
    public var previousResultSize: Int
  • The number of messages to retrieve that were sent after the specified timestamp or message ID. Default is 0

    Declaration

    Swift

    @objc
    public var nextResultSize: Int
  • Determines whether to include the messages with the matching timestamp or message ID in the results. Default is false

    Declaration

    Swift

    @objc
    public var isInclusive: Bool
  • Determines whether to sort the retrieved messages in reverse order. If false, the results are in ascending order. Default is false

    Declaration

    Swift

    @objc
    public var reverse: Bool
  • Restricts the search scope only to retrieve messages with the specified message type. Default is .all

    Declaration

    Swift

    @objc
    public var messageTypeFilter: MessageTypeFilter
  • Restricts the search scope only to retrieve the messages with the specified custom message type. When the custom type filtering is not needed, the value should be set to nil. If the customTypes is set, this property is ignored.

    Declaration

    Swift

    @objc
    public var customType: String?
  • Restricts the search scope only to retrieve the messages sent by the users with the specified user IDs. When the user ID filtering is not needed, the value should be set to nil.

    Declaration

    Swift

    @objc
    public var senderUserIds: [String]?
  • Determines whether to include the metaarray information of the messages in the results. Default is false

    Declaration

    Swift

    @objc
    public var includeMetaArray: Bool
  • Determines whether to include the reactions to the messages in the results. Default is false

    Declaration

    Swift

    @objc
    public var includeReactions: Bool
  • Determines whether to include the thread information of the messages in the results when the results contain root messages.

    Note

    The default value is false.

    Declaration

    Swift

    @objc
    public var includeThreadInfo: Bool
  • Determines whether to include poll information in the message. Default is false

    Declaration

    Swift

    @objc
    public var includePollDetails: Bool
  • Determines whether to include parent message info. Default is false

    Declaration

    Swift

    @objc
    public var includeParentMessageInfo: Bool
  • Determines which reply types to include. Default is .none

    Declaration

    Swift

    @objc
    public var replyType: ReplyType
  • Determines whether to include only messages from the subChannel to which you belong in the results. Default is false

    Warning

    This value is only used in open channels.

    Since

    3.0.204

    Declaration

    Swift

    @objc
    public var showSubChannelMessagesOnly: Bool
  • Restricts the search scope only to retrieve the messages with the multiple specified custom message types. When the custom type filtering is not needed, the value should be set to nil.

    Since

    3.0.213

    Declaration

    Swift

    @objc
    public var customTypes: [String]?
  • Default constructor.

    Declaration

    Swift

    public override init()
  • Parameter constructor

    Declaration

    Swift

    @objc
    public init(
        previousResultSize: Int = 0,
        nextResultSize: Int = 0,
        isInclusive: Bool = false,
        reverse: Bool = false,
        messageTypeFilter: MessageTypeFilter = .all,
        customType: String? = nil,
        senderUserIds: [String]? = nil,
        includeMetaArray: Bool = false,
        includeReactions: Bool = false,
        includeThreadInfo: Bool = false,
        includePollDetails: Bool = false,
        includeParentMessageInfo: Bool = false,
        replyType: ReplyType = .all,
        showSubChannelMessagesOnly: Bool = false,
        customTypes: [String]? = nil
    )
  • Checks whether given message is belonged to this params

    Declaration

    Swift

    @objc
    public func belongsTo(_ message: BaseMessage) -> Bool

    Parameters

    message

    BaseMessage instance

    Return Value

    true if it is belonged, otherwise false

  • Checks whether the given params is belonged to this object

    Declaration

    Swift

    @objc
    public func belongsToMessageParams(_ params: BaseMessageCreateParams) -> Bool

    Return Value

    true if the given params is belonged to this object, otherwise false

  • Copies this object

    Declaration

    Swift

    public func copy(with zone: NSZone? = nil) -> Any

    Parameters

    zone

    optional NSZone

    Return Value

    MessageListParams instance

  • Undocumented

    Declaration

    Swift

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