MessageListParams
public final 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
public var previousResultSize: Int = 20
-
The number of messages to retrieve that were sent after the specified timestamp or message ID. Default is 0
Declaration
Swift
public var nextResultSize: Int = 0
-
Determines whether to include the messages with the matching timestamp or message ID in the results. Default is
false
Declaration
Swift
public var isInclusive: Bool = false
-
Determines whether to sort the retrieved messages in reverse order. If
false
, the results are in ascending order. Default isfalse
Declaration
Swift
public var reverse: Bool = false
-
Restricts the search scope only to retrieve messages with the specified message type. Default is
.all
Declaration
Swift
public var messageTypeFilter: MessageTypeFilter = .all
-
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 thecustomTypes
is set, this property is ignored.Declaration
Swift
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
public var senderUserIds: [String]?
-
Determines whether to include the metaarray information of the messages in the results. Default is
false
Declaration
Swift
public var includeMetaArray: Bool = false
-
Determines whether to include the reactions to the messages in the results. Default is
false
Declaration
Swift
public var includeReactions: Bool = false
-
Determines whether to include the thread information of the messages in the results when the results contain root messages.
Note
The default value isfalse
.Declaration
Swift
public var includeThreadInfo: Bool = false
-
Determines whether to include parent message info. Default is
false
Declaration
Swift
public var includeParentMessageInfo: Bool = false
-
Determines which reply types to include. Default is
.none
Declaration
Swift
public var replyType: ReplyType = .all
-
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.204Declaration
Swift
public var showSubChannelMessagesOnly: Bool = false
-
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.213Declaration
Swift
public var customTypes: [String]?
-
Default constructor.
Declaration
Swift
public override init()
-
init(previousResultSize:
nextResultSize: isInclusive: reverse: messageTypeFilter: customType: senderUserIds: includeMetaArray: includeReactions: includeThreadInfo: includeParentMessageInfo: replyType: showSubChannelMessagesOnly: customTypes: ) Undocumented
Declaration
Swift
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, includeParentMessageInfo: Bool = false, replyType: ReplyType = .all, showSubChannelMessagesOnly: Bool = false, customTypes: [String]? = nil )
-
Parameter constructor Default parameter constructor
Declaration
Swift
public init(builder: ((MessageListParams) -> Void)? = nil)
-
Checks whether given message is belonged to this params
Declaration
Swift
public func belongsTo(_ message: BaseMessage) -> Bool
Parameters
message
BaseMessage
instanceReturn Value
true
if it is belonged, otherwisefalse
-
Checks whether the given params is belonged to this object
Declaration
Swift
public func belongsToMessageParams(_ params: BaseMessageCreateParams) -> Bool
Parameters
params
BaseMessageCreateParams
(either user or file) instanceReturn Value
true
if the given params is belonged to this object, otherwisefalse
-
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
-
Undocumented
Declaration
Swift
public override var description: String