SBDPreviousMessageListQuery Class Reference

Inherits from NSObject
Declared in SBDPreviousMessageListQuery.h

Overview

An object which retrieves messages from the given channel. The instance of this class is created by createPreviousMessageListQuery in SBDBaseChannel class.

  limit

Sets the number of messages per page. The default value is 30.

@property (atomic) NSUInteger limit

Availability

3.0.106

Declared In

SBDPreviousMessageListQuery.h

  reverse

Sets the order of messages. If YES, the latest message is the index 0. The default value is NO.

@property (atomic) BOOL reverse

Availability

3.0.106

Declared In

SBDPreviousMessageListQuery.h

  messageTypeFilter

Sets the message type to filter messages. The default value is SBDMessageTypeFilterAll.

@property (nonatomic) SBDMessageTypeFilter messageTypeFilter

Availability

3.0.106

Declared In

SBDPreviousMessageListQuery.h

  customTypeFilter

Sets the custom type to filter messages.

@property (copy, nonatomic, nullable) NSString *customTypeFilter

Availability

3.0.106

Declared In

SBDPreviousMessageListQuery.h

  customTypesFilter

Sets the custom types to filter messages.

@property (copy, nonatomic, nullable) NSArray<NSString*> *customTypesFilter

Availability

3.0.213

Declared In

SBDPreviousMessageListQuery.h

  senderUserIdsFilter

Sets the senders' user IDs filter.

@property (copy, nonatomic, nullable) NSArray<NSString*> *senderUserIdsFilter

Availability

3.0.106

Declared In

SBDPreviousMessageListQuery.h

  includeMetaArray

If YES, the messages to be returned by loadPreviousMessagesWithLimit:reverse:completionHandler: have meta array.

@property (nonatomic) BOOL includeMetaArray

Availability

3.0.116

Declared In

SBDPreviousMessageListQuery.h

  includeReactions

If YES, the messages to be returned by loadPreviousMessagesWithLimit:reverse:completionHandler: have reactions.

@property (nonatomic) BOOL includeReactions

Availability

3.0.168

Declared In

SBDPreviousMessageListQuery.h

  includeReplies

Determines whether replies are included in the results.

@property (atomic) BOOL includeReplies

Availability

3.0.181

Discussion

Note: The default value is NO.

Declared In

SBDPreviousMessageListQuery.h

  includeParentMessageText

Determines whether to include the parent message text in the results when the messages are replies in a thread. If the type of the parent message is SBDUserMessage, the value is a message. If it is SBDFileMessage, the value is the name of the uploaded file.

@property (atomic) BOOL includeParentMessageText

Availability

3.0.181

Discussion

Note: The default value is NO.

Declared In

SBDPreviousMessageListQuery.h

  includeThreadInfo

Determines whether to include the thread information of the messages in the results when the results contain parent messages.

@property (atomic) BOOL includeThreadInfo

Availability

3.0.181

Discussion

Note: The default value is NO.

Declared In

SBDPreviousMessageListQuery.h

  includePollDetails

Determines whether to include poll information of the message in the results

@property (atomic) BOOL includePollDetails

Availability

3.0.232

Discussion

Note: The default value is NO

Declared In

SBDPreviousMessageListQuery.h

  showSubChannelMessagesOnly

Determines whether to include only messages from the subChannel to which you belong in the results.

@property (atomic) BOOL showSubChannelMessagesOnly

Availability

3.0.204

Discussion

Note: The default value is NO.

Warning: This value is only used in open channels.

Declared In

SBDPreviousMessageListQuery.h

– init

DO NOT USE this initializer. Use [SBDBaseChannel createPreviousMessageListQuery] instead.

- (nullable instancetype)init

Declared In

SBDPreviousMessageListQuery.h

– isLoading

Shows if the query is loading.

- (BOOL)isLoading

Return Value

Returns YES if the query is loading, otherwise returns NO.

Declared In

SBDPreviousMessageListQuery.h

– loadPreviousMessagesWithLimit:reverse:completionHandler:

Loads previous messages.

- (void)loadPreviousMessagesWithLimit:(NSInteger)limit reverse:(BOOL)reverse completionHandler:(nullable void ( ^ ) ( NSArray<SBDBaseMessage*> *_Nullable messages , SBDError *_Nullable error ))completionHandler

Parameters

limit

The number of messages per page.

reverse

If yes, the latest message is the index 0.

completionHandler

The handler block to execute. The messages is the array of SBDBaseMessage instances.

Declared In

SBDPreviousMessageListQuery.h

– loadWithCompletionHandler:

Loads previous messages.

- (void)loadWithCompletionHandler:(nullable void ( ^ ) ( NSArray<SBDBaseMessage*> *_Nullable messages , SBDError *_Nullable error ))completionHandler

Parameters

completionHandler

The handler block to execute. The messages is the array of SBDBaseMessage instances.

Declared In

SBDPreviousMessageListQuery.h