SBDBaseChannel Class Reference
Inherits from | NSObject |
---|---|
Declared in | SBDBaseChannel.h |
Overview
The SBDBaseChannel
class represents the channel where users chat each other. The SBDOpenChannel
and the SBDGroupChannel
are derived from this class. This class provides the common methods for the SBDOpenChannel
and the SBDGroupChannel
.
* Send a user message to the channel.
* Send a file message to the channel.
* Delete a message of the channel.
* Create a query for loading messages of the channel.
* Manipulate meta counters and meta data of the channel.
The channel objects are maintained as a single instance in an application. If you create or get channels from the same channel URL, they must be the same instances.
channelUrl
The channel URL.
@property (strong, nonatomic, nonnull) NSString *channelUrl
Declared In
SBDBaseChannel.h
name
The name of channel.
@property (strong, nonatomic, nonnull) NSString *name
Declared In
SBDBaseChannel.h
coverUrl
The channel cover image URL.
@property (strong, nonatomic, nullable) NSString *coverUrl
Declared In
SBDBaseChannel.h
creator
User who creates the channel
@property (nonatomic, strong, nullable, readonly) SBDUser *creator
Availability
3.0.199
Declared In
SBDBaseChannel.h
createdAt
The timestamp when the channel is created.
@property (atomic) NSUInteger createdAt
Declared In
SBDBaseChannel.h
data
The custom data of the channel.
@property (strong, nonatomic, nullable) NSString *data
Declared In
SBDBaseChannel.h
customType
The custom type of the channel.
@property (strong, nonatomic, nullable) NSString *customType
Declared In
SBDBaseChannel.h
isFrozen
The flag for a frozen channel.
@property (atomic, setter=setFreeze:) BOOL isFrozen
Availability
3.0.89 Was moved from SBDOpenChannel
Declared In
SBDBaseChannel.h
isEphemeral
Represents the channel is ephemeral or not.
@property (nonatomic, readonly) BOOL isEphemeral
Availability
3.0.90
Declared In
SBDBaseChannel.h
– sendUserMessage:completionHandler:
Sends a user message without data.
- (nonnull SBDUserMessage *)sendUserMessage:(NSString *_Nullable)message completionHandler:(nullable void ( ^ ) ( SBDUserMessage *_Nullable userMessage , SBDError *_Nullable error ))completionHandler
Parameters
message |
The message text. |
---|---|
completionHandler |
The handler block to execute. |
Return Value
Returns a temporary user message being sent to the Sendbird server. The message has a request ID instead of a message ID. The request status of the message is pending. If you try to send a message with an invalid parameter, the returned message is a user message with no properties. You can perform a validation of pending message by checking for the existence of the request ID.
Declared In
SBDBaseChannel.h
– sendUserMessage:targetLanguages:completionHandler:
Sends a user message without data. The message will be translated into the target languages. (Deprecated: 3.0.116 (Use sendUserMessageWithParams:completionHandler:
instead.))
- (nonnull SBDUserMessage *)sendUserMessage:(NSString *_Nullable)message targetLanguages:(NSArray<NSString*> *_Nullable)targetLanguages completionHandler:(nullable void ( ^ ) ( SBDUserMessage *_Nullable userMessage , SBDError *_Nullable error ))completionHandler
Parameters
message |
The message text. |
---|---|
targetLanguages |
The target languages that the message will be translated into. |
completionHandler |
The handler block to execute. |
Return Value
Returns a temporary user message being sent to the Sendbird server. The message has a request ID instead of a message ID. The request status of the message is pending. If you try to send a message with an invalid parameter, the returned message is a user message with no properties. You can perform a validation of pending message by checking for the existence of the request ID.
Declared In
SBDBaseChannel.h
– sendUserMessage:data:completionHandler:
Sends a user message with data. (Deprecated: 3.0.116 (Use sendUserMessageWithParams:completionHandler:
instead.))
- (nonnull SBDUserMessage *)sendUserMessage:(NSString *_Nullable)message data:(NSString *_Nullable)data completionHandler:(nullable void ( ^ ) ( SBDUserMessage *_Nullable userMessage , SBDError *_Nullable error ))completionHandler
Parameters
message |
The message text. |
---|---|
data |
The message data. |
completionHandler |
The handler block to execute. |
Return Value
Returns a temporary user message being sent to the Sendbird server. The message has a request ID instead of a message ID. The request status of the message is pending. If you try to send a message with an invalid parameter, the returned message is a user message with no properties. You can perform a validation of pending message by checking for the existence of the request ID.
Declared In
SBDBaseChannel.h
– sendUserMessage:data:targetLanguages:completionHandler:
Sends a user message with data. The message will be translated into the target languages. (Deprecated: 3.0.116 (Use sendUserMessageWithParams:completionHandler:
instead.))
- (nonnull SBDUserMessage *)sendUserMessage:(NSString *_Nullable)message data:(NSString *_Nullable)data targetLanguages:(NSArray<NSString*> *_Nullable)targetLanguages completionHandler:(nullable void ( ^ ) ( SBDUserMessage *_Nullable userMessage , SBDError *_Nullable error ))completionHandler
Parameters
message |
The message text. |
---|---|
data |
The message data. |
targetLanguages |
The target languages that the message will be translated into. |
completionHandler |
The handler block to execute. |
Return Value
Returns a temporary user message being sent to the Sendbird server. The message has a request ID instead of a message ID. The request status of the message is pending. If you try to send a message with an invalid parameter, the returned message is a user message with no properties. You can perform a validation of pending message by checking for the existence of the request ID.
Declared In
SBDBaseChannel.h
– sendUserMessage:data:customType:completionHandler:
Sends a user message with data and custom message type. (Deprecated: 3.0.116 (Use sendUserMessageWithParams:completionHandler:
instead.))
- (nonnull SBDUserMessage *)sendUserMessage:(NSString *_Nullable)message data:(NSString *_Nullable)data customType:(NSString *_Nullable)customType completionHandler:(nullable void ( ^ ) ( SBDUserMessage *_Nullable userMessage , SBDError *_Nullable error ))completionHandler
Parameters
message |
The message text. |
---|---|
data |
The message data. |
customType |
Custom message type. |
completionHandler |
The handler block to execute. |
Return Value
Returns a temporary user message being sent to the Sendbird server. The message has a request ID instead of a message ID. The request status of the message is pending. If you try to send a message with an invalid parameter, the returned message is a user message with no properties. You can perform a validation of pending message by checking for the existence of the request ID.
Declared In
SBDBaseChannel.h
– sendUserMessage:data:customType:targetLanguages:completionHandler:
Sends a user message with data and custom message type. The message will be translated into the target languages. (Deprecated: 3.0.116 (Use sendUserMessageWithParams:completionHandler:
instead.))
- (nonnull SBDUserMessage *)sendUserMessage:(NSString *_Nullable)message data:(NSString *_Nullable)data customType:(NSString *_Nullable)customType targetLanguages:(NSArray<NSString*> *_Nullable)targetLanguages completionHandler:(nullable void ( ^ ) ( SBDUserMessage *_Nullable userMessage , SBDError *_Nullable error ))completionHandler
Parameters
message |
The message text. |
---|---|
data |
The message data. |
customType |
Custom message type. |
targetLanguages |
The target languages that the message will be translated into. |
completionHandler |
The handler block to execute. |
Return Value
Returns a temporary user message being sent to the Sendbird server. The message has a request ID instead of a message ID. The request status of the message is pending. If you try to send a message with an invalid parameter, the returned message is a user message with no properties. You can perform a validation of pending message by checking for the existence of the request ID.
Declared In
SBDBaseChannel.h
– sendUserMessageWithParams:completionHandler:
Sends a string message of params. The message is translated into the target languages.
- (nonnull SBDUserMessage *)sendUserMessageWithParams:(nonnull SBDUserMessageParams *)params completionHandler:(nullable void ( ^ ) ( SBDUserMessage *_Nullable userMessage , SBDError *_Nullable error ))completionHandler
Parameters
params |
The instance of SBDUserMessageParams that can has parameters related with string message. |
---|---|
completionHandler |
The handler block to be executed after the message was sent. This block has no return value and takes two argument, one is a file message was sent and other is an error made when there is something wrong to message. |
Return Value
Returns a temporary user message being sent to the Sendbird server. The message has a request ID instead of a message ID. The request status of the message is pending. If you try to send a message with an invalid parameter, the returned message is a user message with no properties. You can perform a validation of pending message by checking for the existence of the request ID.
Declared In
SBDBaseChannel.h
– resendUserMessageWithMessage:completionHandler:
Attempts to resend a failed user message received by the failure callback. Only failed message MUST be passed, not a succeeded message or a pending message
- (nonnull SBDUserMessage *)resendUserMessageWithMessage:(nonnull SBDUserMessage *)failedMessage completionHandler:(nullable SBDUserMessageHandler)completionHandler
Parameters
failedMessage |
A message to send. A failed message is passed to the callback when fails to send a message |
---|---|
completionHandler |
The handler block to be executed after the message is sent. This block has no return value and takes two arguments. One is a user message. If the message is successfully sent, the complete message instance is delivered. If the message fails to be sent, a failed message based on the pending message is delivered. Another factor is errors. If the message fails to be sent, a message error is dispatched |
Return Value
Returns a temporary user message being sent to the Sendbird server.
Availability
3.0.141 @code SBDUserMessageParams *params = [[SBDUserMessageParams alloc] initWithMessage:text_message]; // set some properties of params [channel sendUserMessageWithParams:params completionHandler:^(SBDUserMessage * Nullable message, SBDError * Nullable error) { if (error != nil) { // handle failure of sending message // if user wants to resend… [channel resendUserMessageWithMessage:message completionHandler:^(SBDUserMessage * Nullable message, SBDError * Nullable error) { // do something. }]; } else { // success to send message } }]; @endcode
Declared In
SBDBaseChannel.h
– sendFileMessageWithBinaryData:filename:type:size:data:completionHandler:
File data.
- (nonnull SBDFileMessage *)sendFileMessageWithBinaryData:(NSData *_Nonnull)file filename:(NSString *_Nonnull)filename type:(NSString *_Nonnull)type size:(NSUInteger)size data:(NSString *_Nullable)data completionHandler:(nullable void ( ^ ) ( SBDFileMessage *_Nullable fileMessage , SBDError *_Nullable error ))completionHandler
Parameters
file |
File data. |
---|---|
filename |
Filename. |
type |
The mime type of file. |
size |
File size. |
data |
Custom data. |
completionHandler |
The handler block to execute. |
Return Value
Returns a temporary file message being sent to the Sendbird server. The message has a request ID instead of a message ID. The request status of the message is pending. If you try to send a message with an invalid parameter, the returned message is a user message with no properties. You can perform a validation of pending message by checking for the existence of the request ID.
Declared In
SBDBaseChannel.h
– sendFileMessageWithBinaryData:filename:type:size:data:customType:completionHandler:
Sends a file message with binary data. The binary data is uploaded to Sendbird file storage and a URL of the file will be generated. (Deprecated: 3.0.116 (Use sendFileMessageWithParams:progressHandler:completionHandler:
instead.))
- (nonnull SBDFileMessage *)sendFileMessageWithBinaryData:(NSData *_Nonnull)file filename:(NSString *_Nonnull)filename type:(NSString *_Nonnull)type size:(NSUInteger)size data:(NSString *_Nullable)data customType:(NSString *_Nullable)customType completionHandler:(nullable void ( ^ ) ( SBDFileMessage *_Nullable fileMessage , SBDError *_Nullable error ))completionHandler
Parameters
file |
File data. |
---|---|
filename |
Filename. |
type |
The mime type of file. |
size |
File size. |
data |
Custom data. |
customType |
Custom message type. |
completionHandler |
The handler block to execute. |
Return Value
Returns a temporary file message being sent to the Sendbird server. The message has a request ID instead of a message ID. The request status of the message is pending. If you try to send a message with an invalid parameter, the returned message is a user message with no properties. You can perform a validation of pending message by checking for the existence of the request ID.
Declared In
SBDBaseChannel.h
– sendFileMessageWithUrl:size:type:data:completionHandler:
Sends a file message with file URL. (Deprecated: 3.0.29. (Use sendFileMessageWithParams:progressHandler:completionHandler:
instead.))
- (nonnull SBDFileMessage *)sendFileMessageWithUrl:(NSString *_Nonnull)url size:(NSUInteger)size type:(NSString *_Nonnull)type data:(NSString *_Nullable)data completionHandler:(nullable void ( ^ ) ( SBDFileMessage *_Nullable fileMessage , SBDError *_Nullable error ))completionHandler
Parameters
url |
File URL. |
---|---|
size |
File size. |
type |
The type of file. |
data |
Custom data. |
completionHandler |
The handler block to execute. |
Return Value
Returns a temporary file message being sent to the Sendbird server. The message has a request ID instead of a message ID. The request status of the message is pending. If you try to send a message with an invalid parameter, the returned message is a user message with no properties. You can perform a validation of pending message by checking for the existence of the request ID.
Declared In
SBDBaseChannel.h
– sendFileMessageWithUrl:filename:size:type:data:completionHandler:
Sends a file message with file URL.
- (nonnull SBDFileMessage *)sendFileMessageWithUrl:(NSString *_Nonnull)url filename:(NSString *_Nullable)filename size:(NSUInteger)size type:(NSString *_Nonnull)type data:(NSString *_Nullable)data completionHandler:(nullable void ( ^ ) ( SBDFileMessage *_Nullable fileMessage , SBDError *_Nullable error ))completionHandler
Parameters
url |
File URL. |
---|---|
filename |
Filename. |
size |
File size. |
type |
The type of file. |
data |
Custom data. |
completionHandler |
The handler block to execute. |
Return Value
Returns a temporary file message being sent to the Sendbird server. The message has a request ID instead of a message ID. The request status of the message is pending. If you try to send a message with an invalid parameter, the returned message is a user message with no properties. You can perform a validation of pending message by checking for the existence of the request ID.
Declared In
SBDBaseChannel.h
– sendFileMessageWithUrl:size:type:data:customType:completionHandler:
Sends a file message with file URL and custom message type. (Deprecated: 3.0.29. (Use sendFileMessageWithParams:progressHandler:completionHandler:
instead.))
- (nonnull SBDFileMessage *)sendFileMessageWithUrl:(NSString *_Nonnull)url size:(NSUInteger)size type:(NSString *_Nonnull)type data:(NSString *_Nullable)data customType:(NSString *_Nullable)customType completionHandler:(nullable void ( ^ ) ( SBDFileMessage *_Nullable fileMessage , SBDError *_Nullable error ))completionHandler
Parameters
url |
File URL. |
---|---|
size |
File size. |
type |
The type of file. |
data |
Custom data. |
customType |
Custom message type. |
completionHandler |
The handler block to execute. |
Return Value
Returns a temporary file message being sent to the Sendbird server. The message has a request ID instead of a message ID. The request status of the message is pending. If you try to send a message with an invalid parameter, the returned message is a user message with no properties. You can perform a validation of pending message by checking for the existence of the request ID.
Declared In
SBDBaseChannel.h
– sendFileMessageWithUrl:filename:size:type:data:customType:completionHandler:
Sends a file message with file URL and custom message type.
- (nonnull SBDFileMessage *)sendFileMessageWithUrl:(NSString *_Nonnull)url filename:(NSString *_Nullable)filename size:(NSUInteger)size type:(NSString *_Nonnull)type data:(NSString *_Nullable)data customType:(NSString *_Nullable)customType completionHandler:(nullable void ( ^ ) ( SBDFileMessage *_Nullable fileMessage , SBDError *_Nullable error ))completionHandler
Parameters
url |
File URL. |
---|---|
filename |
Filename. |
size |
File size. |
type |
The type of file. |
data |
Custom data. |
customType |
Custom message type. |
completionHandler |
The handler block to execute. |
Return Value
Returns a temporary file message being sent to the Sendbird server. The message has a request ID instead of a message ID. The request status of the message is pending. If you try to send a message with an invalid parameter, the returned message is a user message with no properties. You can perform a validation of pending message by checking for the existence of the request ID.
Declared In
SBDBaseChannel.h
– sendFileMessageWithBinaryData:filename:type:size:data:progressHandler:completionHandler:
3.0.116 (Use sendFileMessageWithParams:progressHandler:completionHandler:
instead.) (Deprecated: 3.0.116 (Use sendFileMessageWithParams:progressHandler:completionHandler:
instead.))
- (nonnull SBDFileMessage *)sendFileMessageWithBinaryData:(NSData *_Nonnull)file filename:(NSString *_Nonnull)filename type:(NSString *_Nonnull)type size:(NSUInteger)size data:(NSString *_Nullable)data progressHandler:(nullable void ( ^ ) ( int64_t bytesSent , int64_t totalBytesSent , int64_t totalBytesExpectedToSend ))progressHandler completionHandler:(nullable void ( ^ ) ( SBDFileMessage *_Nullable fileMessage , SBDError *_Nullable error ))completionHandler
Declared In
SBDBaseChannel.h
– sendFileMessageWithBinaryData:filename:type:size:data:customType:progressHandler:completionHandler:
Sends a file message with binary data. The binary data is uploaded to Sendbird file storage and a URL of the file will be generated. The uploading progress callback can be implemented. (Deprecated: 3.0.116 (Use sendFileMessageWithParams:progressHandler:completionHandler:
instead.))
- (nonnull SBDFileMessage *)sendFileMessageWithBinaryData:(NSData *_Nonnull)file filename:(NSString *_Nonnull)filename type:(NSString *_Nonnull)type size:(NSUInteger)size data:(NSString *_Nullable)data customType:(NSString *_Nullable)customType progressHandler:(nullable void ( ^ ) ( int64_t bytesSent , int64_t totalBytesSent , int64_t totalBytesExpectedToSend ))progressHandler completionHandler:(nullable void ( ^ ) ( SBDFileMessage *_Nullable fileMessage , SBDError *_Nullable error ))completionHandler
Parameters
file |
File data. |
---|---|
filename |
Filename. |
type |
The mime type of file. |
size |
File size. |
data |
Custom data. |
customType |
Custom message type. |
progressHandler |
The handler block to monitor progression. |
completionHandler |
The handler block to execute. |
Return Value
Returns a temporary file message being sent to the Sendbird server. The message has a request ID instead of a message ID. The request status of the message is pending. If you try to send a message with an invalid parameter, the returned message is a user message with no properties. You can perform a validation of pending message by checking for the existence of the request ID.
Declared In
SBDBaseChannel.h
– sendFileMessageWithBinaryData:filename:type:size:thumbnailSizes:data:customType:progressHandler:completionHandler:
Sends a file message with binary data. The binary data is uploaded to Sendbird file storage and a URL of the file will be generated. The uploading progress callback can be implemented.
- (nonnull SBDFileMessage *)sendFileMessageWithBinaryData:(NSData *_Nonnull)file filename:(NSString *_Nonnull)filename type:(NSString *_Nonnull)type size:(NSUInteger)size thumbnailSizes:(NSArray<SBDThumbnailSize*> *_Nullable)thumbnailSizes data:(NSString *_Nullable)data customType:(NSString *_Nullable)customType progressHandler:(nullable void ( ^ ) ( int64_t bytesSent , int64_t totalBytesSent , int64_t totalBytesExpectedToSend ))progressHandler completionHandler:(nullable void ( ^ ) ( SBDFileMessage *_Nullable fileMessage , SBDError *_Nullable error ))completionHandler
Parameters
file |
File data. |
---|---|
filename |
Filename. |
type |
The mime type of file. |
size |
File size. |
thumbnailSizes |
Thumbnail sizes. This parameter is the array of |
data |
Custom data. |
customType |
Custom message type. |
progressHandler |
The handler block to monitor progression. |
completionHandler |
The handler block to execute. |
Return Value
Returns a temporary file message being sent to the Sendbird server. The message has a request ID instead of a message ID. The request status of the message is pending. If you try to send a message with an invalid parameter, the returned message is a user message with no properties. You can perform a validation of pending message by checking for the existence of the request ID.
Declared In
SBDBaseChannel.h
– sendFileMessageWithFilePath:type:thumbnailSizes:data:customType:progressHandler:completionHandler:
Sends a file message with binary data. The binary data is uploaded to Sendbird file storage and a URL of the file will be generated. The uploading progress callback can be implemented.
- (nonnull SBDFileMessage *)sendFileMessageWithFilePath:(NSString *_Nonnull)filepath type:(NSString *_Nonnull)type thumbnailSizes:(NSArray<SBDThumbnailSize*> *_Nullable)thumbnailSizes data:(NSString *_Nullable)data customType:(NSString *_Nullable)customType progressHandler:(nullable void ( ^ ) ( int64_t bytesSent , int64_t totalBytesSent , int64_t totalBytesExpectedToSend ))progressHandler completionHandler:(nullable void ( ^ ) ( SBDFileMessage *_Nullable fileMessage , SBDError *_Nullable error ))completionHandler
Parameters
filepath |
File path to be sent. |
---|---|
type |
The mime type of file. |
thumbnailSizes |
Thumbnail sizes. This parameter is the array of |
data |
Custom data. |
customType |
Custom message type. |
progressHandler |
The handler block to monitor progression. |
completionHandler |
The handler block to execute. |
Return Value
Returns a temporary file message being sent to the Sendbird server. The message has a request ID instead of a message ID. The request status of the message is pending. If you try to send a message with an invalid parameter, the returned message is a user message with no properties. You can perform a validation of pending message by checking for the existence of the request ID.
Declared In
SBDBaseChannel.h
– sendFileMessageWithParams:completionHandler:
Sends a file message with file or file URL of params without progress. If the params has a binary file, it will upload data to Sendbird storage. If not, the params has a file url, it will send a message with file url.
- (nonnull SBDFileMessage *)sendFileMessageWithParams:(nonnull SBDFileMessageParams *)params completionHandler:(nullable void ( ^ ) ( SBDFileMessage *_Nullable fileMessage , SBDError *_Nullable error ))completionHandler
Parameters
params |
The instance of SBDFileMessageParams that can has parameters related with file. |
---|---|
completionHandler |
The handler block to be executed after the message was sent. This block has no return value and takes two argument, one is a file message was sent and other is an error made when there is something wrong to message. |
Return Value
Returns a temporary file message being sent to the Sendbird server. The message has a request ID instead of a message ID. The request status of the message is pending. If you try to send a message with an invalid parameter, the returned message is a user message with no properties. You can perform a validation of pending message by checking for the existence of the request ID.
Declared In
SBDBaseChannel.h
– sendFileMessageWithParams:progressHandler:completionHandler:
Sends a file message with file or file URL of params with progress. If the params has a binary file, it will upload data to Sendbird storage. If not, the params has a file url, it will send a message with file url.
- (nonnull SBDFileMessage *)sendFileMessageWithParams:(nonnull SBDFileMessageParams *)params progressHandler:(nullable void ( ^ ) ( int64_t bytesSent , int64_t totalBytesSent , int64_t totalBytesExpectedToSend ))progressHandler completionHandler:(nullable void ( ^ ) ( SBDFileMessage *_Nullable fileMessage , SBDError *_Nullable error ))completionHandler
Parameters
params |
The instance of SBDFileMessageParams that can has parameters related with file. |
---|---|
progressHandler |
The handler block to be used to monitor progression. |
completionHandler |
The handler block to be executed after the message was sent. This block has no return value and takes two argument, one is a file message was sent and other is an error made when there is something wrong to message. |
Return Value
Returns a temporary file message being sent to the Sendbird server. The message has a request ID instead of a message ID. The request status of the message is pending. If you try to send a message with an invalid parameter, the returned message is a user message with no properties. You can perform a validation of pending message by checking for the existence of the request ID.
Declared In
SBDBaseChannel.h
– sendFileMessagesWithParams:progressHandler:sentMessageHandler:completionHandler:
Sends a file message with file or file URL of params with progress. If the params has a binary file, it will upload data to Sendbird storage. If not, the params has a file url, it will send a message with file url.
- (nonnull NSArray<SBDFileMessage*> *)sendFileMessagesWithParams:(nonnull NSArray<SBDFileMessageParams*> *)params progressHandler:(nullable void ( ^ ) ( NSString *_Nullable requestId , int64_t bytesSent , int64_t totalBytesSent , int64_t totalBytesExpectedToSend ))progressHandler sentMessageHandler:(nullable void ( ^ ) ( SBDFileMessage *_Nonnull message , SBDError *_Nullable error ))sentMessageHandler completionHandler:(nullable void ( ^ ) ( SBDError *_Nullable error ))completionHandler
Parameters
params |
The instance of SBDFileMessageParams that can has parameters related with file. |
---|---|
progressHandler |
The handler block to be used to monitor progression. |
sentMessageHandler |
The handler block to be executed after each message was sent. This block has no return value and takes two argument, one is a file message was sent and other is an error made when there is something wrong to message. |
completionHandler |
The handler block to be executed after every message was sent. This block has no return value and takes an error. If the sending message can’t start at all because of the connection issue, the error isn’t nil. |
Return Value
Returns a temporary file message being sent to the Sendbird server. The message has a request ID instead of a message ID. The request status of the message is pending. If you try to send a message with an invalid parameter, the returned message is a user message with no properties. You can perform a validation of pending message by checking for the existence of the request ID.
Availability
3.0.116
Declared In
SBDBaseChannel.h
– resendFileMessageWithMessage:binaryData:completionHandler:
Attempts to resend a failed file message received by the failure callback. Only failed message MUST be passed, not a succeeded message or a pending message. If the failed message has a file URL, it means the failed message was created after failure of sending a file message command. So the method retries to send a file message command. If the failed message does not have a file URL, it means the failed message was created from failure of uploading a binary data. So the method retries to upload a binary data frist.
- (nonnull SBDFileMessage *)resendFileMessageWithMessage:(nonnull SBDFileMessage *)failedMessage binaryData:(nullable NSData *)binaryData completionHandler:(nullable SBDFileMessageHandler)completionHandler
Parameters
failedMessage |
A message to send. A failed message is passed to the callback when fails to send a message |
---|---|
binaryData |
Data to resend. If the failed message has a file URL, the method will not send binary data. If the failed message does not have a file URL, the method will send binary data first and send a file message command with file url. |
completionHandler |
The handler block to be executed after the message is sent. This block has no return value and takes two arguments. One is a file message. If the message is successfully sent, the complete message instance is delivered. If the message fails to be sent, a failed message based on the pending message is delivered except invalid parameter error. If failed because of invalid parameter, message is nil. Another factor is errors. If the message fails to be sent, a message error is dispatched. |
Return Value
Returns a temporary file message being sent to the Sendbird server.
Availability
3.0.147 @code SBDFileMessageParams *params = [[SBDFileMessageParams alloc] initWithFile:binaryData]; // set some properties of params [channel sendFileMessageWithParams:params completionHandler:^(SBDFileMessage * Nullable message, SBDError * Nullable error) { if (error != nil) { // handle failure of sending message // if user wants to resend… [channel resendFileMessageWithMessage:message binaryData:params.file completionHandler:^(SBDFileMessage * Nullable message, SBDError * Nullable error) { // do something. }]; } else { // success to send message } }]; @endcode
Declared In
SBDBaseChannel.h
– resendFileMessageWithMessage:binaryData:progressHandler:completionHandler:
Attempts to resend a failed file message received by the failure callback. Only failed message MUST be passed, not a succeeded message or a pending message. If the failed message has a file URL, it means the failed message was created after failure of sending a file message command. So the method retries to send a file message command. If the failed message does not have a file URL, it means the failed message was created from failure of uploading a binary data. So the method retries to upload a binary data frist.
- (nonnull SBDFileMessage *)resendFileMessageWithMessage:(nonnull SBDFileMessage *)failedMessage binaryData:(nullable NSData *)binaryData progressHandler:(nullable SBDBinaryProgressHandler)progressHandler completionHandler:(nullable SBDFileMessageHandler)completionHandler
Parameters
failedMessage |
A message to send. A failed message is passed to the callback when fails to send a message |
---|---|
binaryData |
Data to resend. If the failed message has a file URL, the method will not send binary data. If the failed message does not have a file URL, the method will send binary data first and send a file message command with file url. |
progressHandler |
The handler block to be used to monitor progression. |
completionHandler |
The handler block to be executed after the message is sent. This block has no return value and takes two arguments. One is a file message. If the message is successfully sent, the complete message instance is delivered. If the message fails to be sent, a failed message based on the pending message is delivered except invalid parameter error. If failed because of invalid parameter, message is nil. Another factor is errors. If the message fails to be sent, a message error is dispatched. |
Return Value
Returns a temporary file message being sent to the Sendbird server.
Availability
3.0.147 @code SBDFileMessageParams *params = [[SBDFileMessageParams alloc] initWithFile:binaryData]; // set some properties of params [channel sendFileMessageWithParams:params completionHandler:^(SBDFileMessage * Nullable message, SBDError * Nullable error) { if (error != nil) { // handle failure of sending message // if user wants to resend… [channel resendFileMessageWithMessage:failedMessage binaryData:params.file progressHandler:^(int64_t bytesSent, int64_t totalBytesSent, int64_t totalBytesExpectedToSend) { // do something in progress } completionHandler:^(SBDFileMessage * Nullable message, SBDError * Nullable error) { // do something. }]; } else { // success to send message } }]; @endcode
Declared In
SBDBaseChannel.h
– createPreviousMessageListQuery
Creates SBDPreviousMessageListQuery
instance for getting the previous messages list of the channel.
- (nullable SBDPreviousMessageListQuery *)createPreviousMessageListQuery
Return Value
Returns the message list of the channel.
Declared In
SBDBaseChannel.h
– createMessageListQuery
Creates SBDMessageListQuery
instance for getting the previous messages list of the channel. (Deprecated: 3.0.28. (Use createPreviousMessageListQuery
, getMessagesByTimestamp:params:completionHandler:
, or getMessagesByMessageId:params:completionHandler:
instead.))
- (nullable SBDMessageListQuery *)createMessageListQuery
Return Value
Returns the message list of the channel.
Declared In
SBDBaseChannel.h
– createOperatorListQuery
Creates SBDOperatorListQuery
instance for getting operators in the channel.
- (nullable SBDOperatorListQuery *)createOperatorListQuery
Return Value
The operator list in the channel.
Availability
3.0.94
Declared In
SBDBaseChannel.h
– createPollListQuery
Creates SBDPollListQuery
instance for getting list of poll in this channel
- (nonnull SBDPollListQuery *)createPollListQuery
Return Value
poll list query
Availability
[NEXT VERSION]
Declared In
SBDBaseChannel.h
– createPollVoterListQueryWithPollId:optionId:
Creates SBDPollListQuery
instance for getting list of poll in this channel
- (nonnull SBDPollVoterListQuery *)createPollVoterListQueryWithPollId:(long long)pollId optionId:(long long)optionId
Parameters
optionId |
poll option id |
---|
Return Value
poll voter list query
Availability
[NEXT VERSION]
Declared In
SBDBaseChannel.h
– createMetaCounters:completionHandler:
Creates the meta counters for the channel.
- (void)createMetaCounters:(NSDictionary<NSString*,NSNumber*> *_Nonnull)metaCounters completionHandler:(nullable void ( ^ ) ( NSDictionary<NSString*,NSNumber*> *_Nullable metaCounters , SBDError *_Nullable error ))completionHandler
Parameters
metaCounters |
The meta counters to be set |
---|---|
completionHandler |
The handler block to execute. |
Declared In
SBDBaseChannel.h
– getMetaCountersWithKeys:completionHandler:
Gets the meta counters with keys for the channel.
- (void)getMetaCountersWithKeys:(NSArray<NSString*> *_Nullable)keys completionHandler:(nullable void ( ^ ) ( NSDictionary<NSString*,NSNumber*> *_Nullable metaCounters , SBDError *_Nullable error ))completionHandler
Parameters
keys |
The keys to get meta counters. |
---|---|
completionHandler |
The handler block to execute. |
Declared In
SBDBaseChannel.h
– getAllMetaCountersWithCompletionHandler:
Gets all meta counters for the channel.
- (void)getAllMetaCountersWithCompletionHandler:(nullable void ( ^ ) ( NSDictionary<NSString*,NSNumber*> *_Nullable metaCounters , SBDError *_Nullable error ))completionHandler
Parameters
completionHandler |
The handler block to execute. |
---|
Declared In
SBDBaseChannel.h
– updateMetaCounters:completionHandler:
Updates the meta counters for the channel.
- (void)updateMetaCounters:(NSDictionary<NSString*,NSNumber*> *_Nonnull)metaCounters completionHandler:(nullable void ( ^ ) ( NSDictionary<NSString*,NSNumber*> *_Nullable metaCounters , SBDError *_Nullable error ))completionHandler
Parameters
metaCounters |
The meta counters to be updated. |
---|---|
completionHandler |
The handler block to execute. |
Declared In
SBDBaseChannel.h
– increaseMetaCounters:completionHandler:
Increases the meta counters for the channel.
- (void)increaseMetaCounters:(NSDictionary<NSString*,NSNumber*> *_Nonnull)metaCounters completionHandler:(nullable void ( ^ ) ( NSDictionary<NSString*,NSNumber*> *_Nullable metaCounters , SBDError *_Nullable error ))completionHandler
Parameters
metaCounters |
The meta counters to be increased. |
---|---|
completionHandler |
The handler block to execute. |
Declared In
SBDBaseChannel.h
– decreaseMetaCounters:completionHandler:
Decreases the meta counters for the channel.
- (void)decreaseMetaCounters:(NSDictionary<NSString*,NSNumber*> *_Nonnull)metaCounters completionHandler:(nullable void ( ^ ) ( NSDictionary<NSString*,NSNumber*> *_Nullable metaCounters , SBDError *_Nullable error ))completionHandler
Parameters
metaCounters |
The meta counters to be decreased. |
---|---|
completionHandler |
The handler block to execute. |
Declared In
SBDBaseChannel.h
– deleteMetaCountersWithKey:completionHandler:
Deletes the meta counters with key for the channel.
- (void)deleteMetaCountersWithKey:(NSString *_Nonnull)key completionHandler:(nullable void ( ^ ) ( SBDError *_Nullable error ))completionHandler
Parameters
key |
The key to be deleted. |
---|---|
completionHandler |
The handler block to execute. |
Declared In
SBDBaseChannel.h
– deleteAllMetaCountersWithCompletionHandler:
Deletes all meta counters for the channel.
- (void)deleteAllMetaCountersWithCompletionHandler:(nullable void ( ^ ) ( SBDError *_Nullable error ))completionHandler
Parameters
completionHandler |
The handler block to execute. |
---|
Declared In
SBDBaseChannel.h
– createMetaData:completionHandler:
Creates the meta data for the channel.
- (void)createMetaData:(NSDictionary<NSString*,NSString*> *_Nonnull)metaData completionHandler:(nullable void ( ^ ) ( NSDictionary<NSString*,NSString*> *_Nullable metaData , SBDError *_Nullable error ))completionHandler
Parameters
metaData |
The meta data to be set. |
---|---|
completionHandler |
The handler block to execute. |
Declared In
SBDBaseChannel.h
– getMetaDataWithKeys:completionHandler:
Gets the meta data for the channel.
- (void)getMetaDataWithKeys:(NSArray<NSString*> *_Nullable)keys completionHandler:(nullable void ( ^ ) ( NSDictionary<NSString*,NSString*> *_Nullable metaData , SBDError *_Nullable error ))completionHandler
Parameters
keys |
The keys to get meta data. |
---|---|
completionHandler |
The handler block to execute. |
Declared In
SBDBaseChannel.h
– getAllMetaDataWithCompletionHandler:
Gets all meta data for the channel.
- (void)getAllMetaDataWithCompletionHandler:(nullable void ( ^ ) ( NSDictionary<NSString*,NSString*> *_Nullable metaData , SBDError *_Nullable error ))completionHandler
Parameters
completionHandler |
The handler block to execute. |
---|
Declared In
SBDBaseChannel.h
– updateMetaData:completionHandler:
Updates the meta data for the channel.
- (void)updateMetaData:(NSDictionary<NSString*,NSString*> *_Nonnull)metaData completionHandler:(nullable void ( ^ ) ( NSDictionary<NSString*,NSString*> *_Nullable metaData , SBDError *_Nullable error ))completionHandler
Parameters
metaData |
The meta data to be updated. |
---|---|
completionHandler |
The handler block to execute. |
Declared In
SBDBaseChannel.h
– deleteMetaDataWithKey:completionHandler:
Deletes meta data with key for the channel.
- (void)deleteMetaDataWithKey:(NSString *_Nonnull)key completionHandler:(nullable void ( ^ ) ( SBDError *_Nullable error ))completionHandler
Parameters
key |
The key to be deleted. |
---|---|
completionHandler |
The handler block to execute. |
Declared In
SBDBaseChannel.h
– deleteAllMetaDataWithCompletionHandler:
Deletes all meta data for the channel.
- (void)deleteAllMetaDataWithCompletionHandler:(nullable void ( ^ ) ( SBDError *_Nullable error ))completionHandler
Parameters
completionHandler |
The handler block to execute. |
---|
Declared In
SBDBaseChannel.h
– deleteMessage:completionHandler:
Deletes a message. The message’s sender has to be the current user.
- (void)deleteMessage:(SBDBaseMessage *_Nonnull)message completionHandler:(nullable void ( ^ ) ( SBDError *_Nullable error ))completionHandler
Parameters
message |
The message to be deleted. |
---|---|
completionHandler |
The handler block to execute. |
Declared In
SBDBaseChannel.h
– deleteMessageWithMessageId:completionHandler:
Deletes a message. The message’s sender has to be the current user.
- (void)deleteMessageWithMessageId:(long long)messageId completionHandler:(nullable void ( ^ ) ( SBDError *_Nullable error ))completionHandler
Parameters
messageId |
The message id to be deleted. |
---|---|
completionHandler |
The handler block to execute. |
Availability
3.0.179
Declared In
SBDBaseChannel.h
– updateUserMessage:messageText:data:customType:completionHandler:
Updates a user message. The message text, data, and custom type can be updated
- (void)updateUserMessage:(SBDUserMessage *_Nonnull)userMessage messageText:(NSString *_Nullable)messageText data:(NSString *_Nullable)data customType:(NSString *_Nullable)customType completionHandler:(nullable void ( ^ ) ( SBDUserMessage *_Nullable userMessage , SBDError *_Nullable error ))completionHandler
Parameters
userMessage |
The user message to be updated. |
---|---|
messageText |
New message text. |
data |
New data. |
customType |
New custom type. |
completionHandler |
The handler block to execute. |
Declared In
SBDBaseChannel.h
– updateUserMessageWithMessageId:userMessageParams:completionHandler:
3.0.110
- (void)updateUserMessageWithMessageId:(long long)messageId userMessageParams:(nonnull SBDUserMessageParams *)params completionHandler:(nullable void ( ^ ) ( SBDUserMessage *_Nullable message , SBDError *_Nullable error ))completionHandler
Availability
3.0.110
Declared In
SBDBaseChannel.h
– updateFileMessage:data:customType:completionHandler:
Updates a file message. The data and custom type can be updated
- (void)updateFileMessage:(SBDFileMessage *_Nonnull)fileMessage data:(NSString *_Nullable)data customType:(NSString *_Nullable)customType completionHandler:(nullable void ( ^ ) ( SBDFileMessage *_Nullable fileMessage , SBDError *_Nullable error ))completionHandler
Parameters
fileMessage |
The file message to be updated. |
---|---|
data |
New data. |
customType |
New custom type. |
completionHandler |
The handler block to execute. |
Declared In
SBDBaseChannel.h
– updateFileMessageWithMessageId:fileMessageParams:completionHandler:
Updates a file message. The data, custom type from file message params can be updated.
- (void)updateFileMessageWithMessageId:(long long)messageId fileMessageParams:(nonnull SBDFileMessageParams *)params completionHandler:(nullable void ( ^ ) ( SBDFileMessage *_Nullable message , SBDError *_Nullable error ))completionHandler
Parameters
messageId |
The message ID of the message to be updated. |
---|---|
params |
The file message params that has updating fields. |
completionHandler |
The handler block to be executed after update. This block has no return value and takes two argument. the one is updated message type of SBDFileMessage. the other is an error made when there is something wrong to process. |
Availability
3.0.110
Declared In
SBDBaseChannel.h
– translateUserMessage:targetLanguages:completionHandler:
NSDictionary *translations = message.translations;
// do somthing.
}]; @endcode
- (void)translateUserMessage:(nonnull SBDUserMessage *)message targetLanguages:(nonnull NSArray<NSString*> *)targetLanguages completionHandler:(nullable SBDUserMessageHandler)completionHandler
Declared In
SBDBaseChannel.h
– isGroupChannel
Checks the channel type.
- (BOOL)isGroupChannel
Return Value
If YES, this channel is a group channel.
Declared In
SBDBaseChannel.h
– isOpenChannel
Checks the channel type.
- (BOOL)isOpenChannel
Return Value
If YES, this channel is an open channel.
Declared In
SBDBaseChannel.h
– getNextMessagesByTimestamp:limit:reverse:completionHandler:
Gets the next messages by the timestamp with a limit and ordering. (Deprecated: 3.0.40 (Use getMessagesByTimestamp:params:completionHandler:
instead.))
- (void)getNextMessagesByTimestamp:(long long)timestamp limit:(NSInteger)limit reverse:(BOOL)reverse completionHandler:(nullable void ( ^ ) ( NSArray<SBDBaseMessage*> *_Nullable messages , SBDError *_Nullable error ))completionHandler
Parameters
timestamp |
The standard timestamp to load messages. |
---|---|
limit |
The limit for the number of messages. The returned messages could be more than this number if there are messages which have the same timestamp. |
reverse |
If yes, the latest message is the index 0. |
completionHandler |
The handler block to execute. The |
Declared In
SBDBaseChannel.h
– getNextMessagesByTimestamp:limit:reverse:messageType:customType:completionHandler:
Gets the next messages by the timestamp with a limit and ordering. (Deprecated: 3.0.231 (Use getMessagesByTimestamp:params:completionHandler:
instead.))
- (void)getNextMessagesByTimestamp:(long long)timestamp limit:(NSInteger)limit reverse:(BOOL)reverse messageType:(SBDMessageTypeFilter)messageType customType:(NSString *_Nullable)customType completionHandler:(nullable void ( ^ ) ( NSArray<SBDBaseMessage*> *_Nullable messages , SBDError *_Nullable error ))completionHandler
Parameters
timestamp |
The standard timestamp to load messages. |
---|---|
limit |
The limit for the number of messages. The returned messages could be more than this number if there are messages which have the same timestamp. |
reverse |
If yes, the latest message is the index 0. |
messageType |
Message type to filter messages. |
customType |
Custom type to filter messages. If filtering isn’t required, set nil. |
completionHandler |
The handler block to execute. The |
Declared In
SBDBaseChannel.h
– getNextMessagesByTimestamp:limit:reverse:messageType:customType:senderUserIds:completionHandler:
Gets the next messages by the timestamp with a limit and ordering. (Deprecated: 3.0.231 (Use getMessagesByTimestamp:params:completionHandler:
instead.))
- (void)getNextMessagesByTimestamp:(long long)timestamp limit:(NSInteger)limit reverse:(BOOL)reverse messageType:(SBDMessageTypeFilter)messageType customType:(NSString *_Nullable)customType senderUserIds:(NSArray<NSString*> *_Nullable)senderUserIds completionHandler:(nullable void ( ^ ) ( NSArray<SBDBaseMessage*> *_Nullable messages , SBDError *_Nullable error ))completionHandler
Parameters
timestamp |
The standard timestamp to load messages. |
---|---|
limit |
The limit for the number of messages. The returned messages could be more than this number if there are messages which have the same timestamp. |
reverse |
If yes, the latest message is the index 0. |
messageType |
Message type to filter messages. |
customType |
Custom type to filter messages. If filtering isn’t required, set nil. |
senderUserIds |
Returns messages whose sender user id matches sender user ids. |
completionHandler |
The handler block to execute. The |
Availability
3.0.106
Declared In
SBDBaseChannel.h
– getNextMessagesByTimestamp:limit:reverse:messageType:customType:senderUserIds:includeMetaArray:completionHandler:
Gets the next messages by the timestamp. The messages can have meta array. (Deprecated: 3.0.231 (Use getMessagesByTimestamp:params:completionHandler:
instead.))
- (void)getNextMessagesByTimestamp:(long long)timestamp limit:(NSInteger)limit reverse:(BOOL)reverse messageType:(SBDMessageTypeFilter)messageType customType:(NSString *_Nullable)customType senderUserIds:(NSArray<NSString*> *_Nullable)senderUserIds includeMetaArray:(BOOL)includeMetaArray completionHandler:(nullable void ( ^ ) ( NSArray<SBDBaseMessage*> *_Nullable messages , SBDError *_Nullable error ))completionHandler
Parameters
timestamp |
The standard timestamp to load messages. |
---|---|
limit |
The limit for the number of messages. The returned messages could be more than this number if there are messages which have the same timestamp. |
reverse |
If YES, the latest message is the index 0. |
messageType |
Message type to filter messages. |
customType |
Custom type to filter messages. If filtering isn’t required, set nil. |
senderUserIds |
Returns messages whose sender user id matches sender user ids. |
includeMetaArray |
If YES, the |
completionHandler |
The handler block to execute. The |
Availability
3.0.116
Declared In
SBDBaseChannel.h
– getNextMessagesByTimestamp:inclusiveTimestamp:limit:reverse:messageType:customType:senderUserIds:includeMetaArray:completionHandler:
Requests to next messages by the timestamp with filters of inclusive timestamp, limit, reverse, message type, custom type, sender user ids, include meta array. (Deprecated: 3.0.169 (Use getMessagesByTimestamp:params:completionHandler:
instead.))
- (void)getNextMessagesByTimestamp:(long long)timestamp inclusiveTimestamp:(BOOL)inclusiveTimestamp limit:(NSInteger)limit reverse:(BOOL)reverse messageType:(SBDMessageTypeFilter)messageType customType:(NSString *_Nullable)customType senderUserIds:(NSArray<NSString*> *_Nullable)senderUserIds includeMetaArray:(BOOL)includeMetaArray completionHandler:(nullable SBDGetMessagesHandler)completionHandler
Parameters
timestamp |
The standard timestamp to load messages. |
---|---|
inclusiveTimestamp |
Whether the response has messages including timestamp or not. If true (YES), results contain messages that created at the timestamp. If false (NO), results have messages that created after the timestamp |
limit |
The limit for the number of messages. The returned messages could be more than this number if there are messages which have the same timestamp. |
reverse |
If YES, the latest message is the index 0. |
messageType |
Message type to filter messages. |
customType |
Custom type to filter messages. If filtering isn’t required, set nil. |
senderUserIds |
Returns messages whose sender user id matches sender user ids. |
includeMetaArray |
If YES, the |
completionHandler |
The handler block to execute. The |
Availability
3.0.140
Declared In
SBDBaseChannel.h
– getNextMessagesByTimestamp:inclusiveTimestamp:limit:reverse:messageType:customType:senderUserIds:includeMetaArray:includeReactions:completionHandler:
Requests to next messages by the timestamp with filters of inclusive timestamp, limit, reverse, message type, custom type, sender user ids, include meta array, and include reactions. (Deprecated: 3.0.231 (Use getMessagesByTimestamp:params:completionHandler:
instead.))
- (void)getNextMessagesByTimestamp:(long long)timestamp inclusiveTimestamp:(BOOL)inclusiveTimestamp limit:(NSInteger)limit reverse:(BOOL)reverse messageType:(SBDMessageTypeFilter)messageType customType:(NSString *_Nullable)customType senderUserIds:(NSArray<NSString*> *_Nullable)senderUserIds includeMetaArray:(BOOL)includeMetaArray includeReactions:(BOOL)includeReactions completionHandler:(nullable SBDGetMessagesHandler)completionHandler
Parameters
timestamp |
The standard timestamp to load messages. |
---|---|
inclusiveTimestamp |
Whether the response has messages including timestamp or not. If true (YES), results contain messages that created at the timestamp. If false (NO), results have messages that created after the timestamp |
limit |
The limit for the number of messages. The returned messages could be more than this number if there are messages which have the same timestamp. |
reverse |
If YES, the latest message is the index 0. |
messageType |
Message type to filter messages. |
customType |
Custom type to filter messages. If filtering isn’t required, set nil. |
senderUserIds |
Returns messages whose sender user id matches sender user ids. |
includeMetaArray |
If YES, the |
includeReactions |
If YES, the |
completionHandler |
The handler block to execute. The |
Availability
3.0.169
Declared In
SBDBaseChannel.h
– getPreviousMessagesByTimestamp:limit:reverse:completionHandler:
Gets the previous messages by the timestamp with a limit and ordering. (Deprecated: 3.0.40 (Use getMessagesByTimestamp:params:completionHandler:
instead.))
- (void)getPreviousMessagesByTimestamp:(long long)timestamp limit:(NSInteger)limit reverse:(BOOL)reverse completionHandler:(nullable void ( ^ ) ( NSArray<SBDBaseMessage*> *_Nullable messages , SBDError *_Nullable error ))completionHandler
Parameters
timestamp |
The standard timestamp to load messages. |
---|---|
limit |
The limit for the number of messages. The returned messages could be more than this number if there are messages which have the same timestamp. |
reverse |
If yes, the latest message is the index 0. |
completionHandler |
The handler block to execute. The |
Declared In
SBDBaseChannel.h
– getPreviousMessagesByTimestamp:limit:reverse:messageType:customType:completionHandler:
Gets the previous messages by the timestamp with a limit and ordering. (Deprecated: 3.0.231 (Use getMessagesByTimestamp:params:completionHandler:
instead.))
- (void)getPreviousMessagesByTimestamp:(long long)timestamp limit:(NSInteger)limit reverse:(BOOL)reverse messageType:(SBDMessageTypeFilter)messageType customType:(NSString *_Nullable)customType completionHandler:(nullable void ( ^ ) ( NSArray<SBDBaseMessage*> *_Nullable messages , SBDError *_Nullable error ))completionHandler
Parameters
timestamp |
The standard timestamp to load messages. |
---|---|
limit |
The limit for the number of messages. The returned messages could be more than this number if there are messages which have the same timestamp. |
reverse |
If yes, the latest message is the index 0. |
messageType |
Message type to filter messages. |
customType |
Custom type to filter messages. If filtering isn’t required, set nil. |
completionHandler |
The handler block to execute. The |
Declared In
SBDBaseChannel.h
– getPreviousMessagesByTimestamp:limit:reverse:messageType:customType:senderUserIds:completionHandler:
Gets the previous messages by the timestamp with a limit and ordering. (Deprecated: 3.0.231 (Use getMessagesByTimestamp:params:completionHandler:
instead.))
- (void)getPreviousMessagesByTimestamp:(long long)timestamp limit:(NSInteger)limit reverse:(BOOL)reverse messageType:(SBDMessageTypeFilter)messageType customType:(NSString *_Nullable)customType senderUserIds:(NSArray<NSString*> *_Nullable)senderUserIds completionHandler:(nullable void ( ^ ) ( NSArray<SBDBaseMessage*> *_Nullable messages , SBDError *_Nullable error ))completionHandler
Parameters
timestamp |
The standard timestamp to load messages. |
---|---|
limit |
The limit for the number of messages. The returned messages could be more than this number if there are messages which have the same timestamp. |
reverse |
If yes, the latest message is the index 0. |
messageType |
Message type to filter messages. |
customType |
Custom type to filter messages. If filtering isn’t required, set nil. |
senderUserIds |
Returns messages whose sender user id matches sender user ids. |
completionHandler |
The handler block to execute. The |
Availability
3.0.106
Declared In
SBDBaseChannel.h
– getPreviousMessagesByTimestamp:limit:reverse:messageType:customType:senderUserIds:includeMetaArray:completionHandler:
Gets the previous messages by the timestamp. The messages can have meta array. (Deprecated: 3.0.231 (Use getMessagesByTimestamp:params:completionHandler:
instead.))
- (void)getPreviousMessagesByTimestamp:(long long)timestamp limit:(NSInteger)limit reverse:(BOOL)reverse messageType:(SBDMessageTypeFilter)messageType customType:(NSString *_Nullable)customType senderUserIds:(NSArray<NSString*> *_Nullable)senderUserIds includeMetaArray:(BOOL)includeMetaArray completionHandler:(nullable void ( ^ ) ( NSArray<SBDBaseMessage*> *_Nullable messages , SBDError *_Nullable error ))completionHandler
Parameters
timestamp |
The standard timestamp to load messages. |
---|---|
limit |
The limit for the number of messages. The returned messages could be more than this number if there are messages which have the same timestamp. |
reverse |
If YES, the latest message is the index 0. |
messageType |
Message type to filter messages. |
customType |
Custom type to filter messages. If filtering isn’t required, set nil. |
senderUserIds |
Returns messages whose sender user id matches sender user ids. |
includeMetaArray |
If YES, the |
completionHandler |
The handler block to execute. The |
Availability
3.0.116
Declared In
SBDBaseChannel.h
– getPreviousMessagesByTimestamp:inclusiveTimestamp:limit:reverse:messageType:customType:senderUserIds:includeMetaArray:completionHandler:
Requests to previous messages by the timestamp with filters of inclusive timestamp, limit, reverse, message type, custom type, sender user ids, include meta array. (Deprecated: 3.0.169 (Use getMessagesByTimestamp:params:completionHandler:
instead.))
- (void)getPreviousMessagesByTimestamp:(long long)timestamp inclusiveTimestamp:(BOOL)inclusiveTimestamp limit:(NSInteger)limit reverse:(BOOL)reverse messageType:(SBDMessageTypeFilter)messageType customType:(NSString *_Nullable)customType senderUserIds:(NSArray<NSString*> *_Nullable)senderUserIds includeMetaArray:(BOOL)includeMetaArray completionHandler:(nullable SBDGetMessagesHandler)completionHandler
Parameters
timestamp |
The standard timestamp to load messages. |
---|---|
inclusiveTimestamp |
Whether the response has messages including timestamp or not. If true (YES), results contain messages that created at the timestamp. If false (NO), results have messages that created before the timestamp |
limit |
The limit for the number of messages. The returned messages could be more than this number if there are messages which have the same timestamp. |
reverse |
If YES, the latest message is the index 0. |
messageType |
Message type to filter messages. |
customType |
Custom type to filter messages. If filtering isn’t required, set nil. |
senderUserIds |
Returns messages whose sender user id matches sender user ids. |
includeMetaArray |
If YES, the |
completionHandler |
The handler block to execute. The |
Availability
3.0.140
Declared In
SBDBaseChannel.h
– getPreviousMessagesByTimestamp:inclusiveTimestamp:limit:reverse:messageType:customType:senderUserIds:includeMetaArray:includeReactions:completionHandler:
Requests to previous messages by the timestamp with filters of inclusive timestamp, limit, reverse, message type, custom type, sender user ids, include meta array, and include reactions. (Deprecated: 3.0.231 (Use getMessagesByTimestamp:params:completionHandler:
instead.))
- (void)getPreviousMessagesByTimestamp:(long long)timestamp inclusiveTimestamp:(BOOL)inclusiveTimestamp limit:(NSInteger)limit reverse:(BOOL)reverse messageType:(SBDMessageTypeFilter)messageType customType:(NSString *_Nullable)customType senderUserIds:(NSArray<NSString*> *_Nullable)senderUserIds includeMetaArray:(BOOL)includeMetaArray includeReactions:(BOOL)includeReactions completionHandler:(nullable SBDGetMessagesHandler)completionHandler
Parameters
timestamp |
The standard timestamp to load messages. |
---|---|
inclusiveTimestamp |
Whether the response has messages including timestamp or not. If true (YES), results contain messages that created at the timestamp. If false (NO), results have messages that created before the timestamp |
limit |
The limit for the number of messages. The returned messages could be more than this number if there are messages which have the same timestamp. |
reverse |
If YES, the latest message is the index 0. |
messageType |
Message type to filter messages. |
customType |
Custom type to filter messages. If filtering isn’t required, set nil. |
senderUserIds |
Returns messages whose sender user id matches sender user ids. |
includeMetaArray |
If YES, the |
includeReactions |
If YES, the |
completionHandler |
The handler block to execute. The |
Availability
3.0.169
Declared In
SBDBaseChannel.h
– getPreviousAndNextMessagesByTimestamp:prevLimit:nextLimit:reverse:completionHandler:
Gets the previous and next message by the timestamp with a limit and ordering. (Deprecated: 3.0.40 (Use getMessagesByTimestamp:params:completionHandler:
instead.))
- (void)getPreviousAndNextMessagesByTimestamp:(long long)timestamp prevLimit:(NSInteger)prevLimit nextLimit:(NSInteger)nextLimit reverse:(BOOL)reverse completionHandler:(nullable void ( ^ ) ( NSArray<SBDBaseMessage*> *_Nullable messages , SBDError *_Nullable error ))completionHandler
Parameters
timestamp |
The standard timestamp to load messages. |
---|---|
prevLimit |
The previous limit for the number of messages. The returned messages could be more than this number if there are messages which have the same timestamp. |
nextLimit |
The next limit for the number of messages. The returned messages could be more than this number if there are messages which have the same timestamp. |
reverse |
If yes, the latest message is the index 0. |
completionHandler |
The handler block to execute. The |
Declared In
SBDBaseChannel.h
– getPreviousAndNextMessagesByTimestamp:prevLimit:nextLimit:reverse:messageType:customType:completionHandler:
Gets the previous and next message by the timestamp with a limit and ordering. (Deprecated: 3.0.231 (Use getMessagesByTimestamp:params:completionHandler:
instead.))
- (void)getPreviousAndNextMessagesByTimestamp:(long long)timestamp prevLimit:(NSInteger)prevLimit nextLimit:(NSInteger)nextLimit reverse:(BOOL)reverse messageType:(SBDMessageTypeFilter)messageType customType:(NSString *_Nullable)customType completionHandler:(nullable void ( ^ ) ( NSArray<SBDBaseMessage*> *_Nullable messages , SBDError *_Nullable error ))completionHandler
Parameters
timestamp |
The standard timestamp to load messages. |
---|---|
prevLimit |
The previous limit for the number of messages. The returned messages could be more than this number if there are messages which have the same timestamp. |
nextLimit |
The next limit for the number of messages. The returned messages could be more than this number if there are messages which have the same timestamp. |
reverse |
If yes, the latest message is the index 0. |
messageType |
Message type to filter messages. |
customType |
Custom type to filter messages. If filtering isn’t required, set nil. |
completionHandler |
The handler block to execute. The |
Declared In
SBDBaseChannel.h
– getPreviousAndNextMessagesByTimestamp:prevLimit:nextLimit:reverse:messageType:customType:senderUserIds:completionHandler:
Gets the previous and next message by the timestamp with a limit and ordering. (Deprecated: 3.0.231 (Use getMessagesByTimestamp:params:completionHandler:
instead.))
- (void)getPreviousAndNextMessagesByTimestamp:(long long)timestamp prevLimit:(NSInteger)prevLimit nextLimit:(NSInteger)nextLimit reverse:(BOOL)reverse messageType:(SBDMessageTypeFilter)messageType customType:(NSString *_Nullable)customType senderUserIds:(NSArray<NSString*> *_Nullable)senderUserIds completionHandler:(nullable void ( ^ ) ( NSArray<SBDBaseMessage*> *_Nullable messages , SBDError *_Nullable error ))completionHandler
Parameters
timestamp |
The standard timestamp to load messages. |
---|---|
prevLimit |
The previous limit for the number of messages. The returned messages could be more than this number if there are messages which have the same timestamp. |
nextLimit |
The next limit for the number of messages. The returned messages could be more than this number if there are messages which have the same timestamp. |
reverse |
If yes, the latest message is the index 0. |
messageType |
Message type to filter messages. |
customType |
Custom type to filter messages. If filtering isn’t required, set nil. |
senderUserIds |
Returns messages whose sender user id matches sender user ids. |
completionHandler |
The handler block to execute. The |
Availability
3.0.106
Declared In
SBDBaseChannel.h
– getPreviousAndNextMessagesByTimestamp:prevLimit:nextLimit:reverse:messageType:customType:senderUserIds:includeMetaArray:completionHandler:
Gets the previous and next messages by the timestamp. The messages can have meta array.
- (void)getPreviousAndNextMessagesByTimestamp:(long long)timestamp prevLimit:(NSInteger)prevLimit nextLimit:(NSInteger)nextLimit reverse:(BOOL)reverse messageType:(SBDMessageTypeFilter)messageType customType:(NSString *_Nullable)customType senderUserIds:(NSArray<NSString*> *_Nullable)senderUserIds includeMetaArray:(BOOL)includeMetaArray completionHandler:(nullable void ( ^ ) ( NSArray<SBDBaseMessage*> *_Nullable messages , SBDError *_Nullable error ))completionHandler
Parameters
timestamp |
The standard timestamp to load messages. |
---|---|
prevLimit |
The previous limit for the number of messages. The returned messages could be more than this number if there are messages which have the same timestamp. |
nextLimit |
The next limit for the number of messages. The returned messages could be more than this number if there are messages which have the same timestamp. |
reverse |
If YES, the latest message is the index 0. |
messageType |
Message type to filter messages. |
customType |
Custom type to filter messages. If filtering isn’t required, set nil. |
senderUserIds |
Returns messages whose sender user id matches sender user ids. |
includeMetaArray |
If YES, the |
completionHandler |
The handler block to execute. The |
Availability
3.0.116 (Use getMessagesByTimestamp:params:completionHandler:
instead.)
Declared In
SBDBaseChannel.h
– getPreviousAndNextMessagesByTimestamp:prevLimit:nextLimit:reverse:messageType:customType:senderUserIds:includeMetaArray:includeReactions:completionHandler:
Gets the previous and next messages by the timestamp with filters of prev limit, next limit, reverse, message type, custom type, sender user ids, include meta array, and include reactions. (Deprecated: 3.0.231 (Use getMessagesByTimestamp:params:completionHandler:
instead.))
- (void)getPreviousAndNextMessagesByTimestamp:(long long)timestamp prevLimit:(NSInteger)prevLimit nextLimit:(NSInteger)nextLimit reverse:(BOOL)reverse messageType:(SBDMessageTypeFilter)messageType customType:(NSString *_Nullable)customType senderUserIds:(NSArray<NSString*> *_Nullable)senderUserIds includeMetaArray:(BOOL)includeMetaArray includeReactions:(BOOL)includeReactions completionHandler:(nullable void ( ^ ) ( NSArray<SBDBaseMessage*> *_Nullable messages , SBDError *_Nullable error ))completionHandler
Parameters
timestamp |
The standard timestamp to load messages. |
---|---|
prevLimit |
The previous limit for the number of messages. The returned messages could be more than this number if there are messages which have the same timestamp. |
nextLimit |
The next limit for the number of messages. The returned messages could be more than this number if there are messages which have the same timestamp. |
reverse |
If YES, the latest message is the index 0. |
messageType |
Message type to filter messages. |
customType |
Custom type to filter messages. If filtering isn’t required, set nil. |
senderUserIds |
Returns messages whose sender user id matches sender user ids. |
includeMetaArray |
If YES, the |
includeReactions |
If YES, the |
completionHandler |
The handler block to execute. The |
Availability
3.0.169
Declared In
SBDBaseChannel.h
– getNextMessagesByMessageId:limit:reverse:completionHandler:
Gets the next messages by the message ID with a limit and ordering. (Deprecated: 3.0.40 (Use getMessagesByMessageId:params:completionHandler:
instead.))
- (void)getNextMessagesByMessageId:(long long)messageId limit:(NSInteger)limit reverse:(BOOL)reverse completionHandler:(nullable void ( ^ ) ( NSArray<SBDBaseMessage*> *_Nullable messages , SBDError *_Nullable error ))completionHandler
Parameters
messageId |
The standard message ID to load messages. |
---|---|
limit |
The limit for the number of messages. The returned messages could be more than this number if there are messages which have the same timestamp. |
reverse |
If yes, the latest message is the index 0. |
completionHandler |
The handler block to execute. The |
Declared In
SBDBaseChannel.h
– getNextMessagesByMessageId:limit:reverse:messageType:customType:completionHandler:
Gets the next messages by the message ID with a limit and ordering. (Deprecated: 3.0.231 (Use getMessagesByMessageId:params:completionHandler:
instead.))
- (void)getNextMessagesByMessageId:(long long)messageId limit:(NSInteger)limit reverse:(BOOL)reverse messageType:(SBDMessageTypeFilter)messageType customType:(NSString *_Nullable)customType completionHandler:(nullable void ( ^ ) ( NSArray<SBDBaseMessage*> *_Nullable messages , SBDError *_Nullable error ))completionHandler
Parameters
messageId |
The standard message ID to load messages. |
---|---|
limit |
The limit for the number of messages. The returned messages could be more than this number if there are messages which have the same timestamp. |
reverse |
If yes, the latest message is the index 0. |
messageType |
Message type to filter messages. |
customType |
Custom type to filter messages. If filtering isn’t required, set nil. |
completionHandler |
The handler block to execute. The |
Declared In
SBDBaseChannel.h
– getNextMessagesByMessageId:limit:reverse:messageType:customType:senderUserIds:completionHandler:
Gets the next messages by the message ID with a limit and ordering. (Deprecated: 3.0.231 (Use getMessagesByMessageId:params:completionHandler:
instead.))
- (void)getNextMessagesByMessageId:(long long)messageId limit:(NSInteger)limit reverse:(BOOL)reverse messageType:(SBDMessageTypeFilter)messageType customType:(NSString *_Nullable)customType senderUserIds:(NSArray<NSString*> *_Nullable)senderUserIds completionHandler:(nullable void ( ^ ) ( NSArray<SBDBaseMessage*> *_Nullable messages , SBDError *_Nullable error ))completionHandler
Parameters
messageId |
The standard message ID to load messages. |
---|---|
limit |
The limit for the number of messages. The returned messages could be more than this number if there are messages which have the same timestamp. |
reverse |
If yes, the latest message is the index 0. |
messageType |
Message type to filter messages. |
customType |
Custom type to filter messages. If filtering isn’t required, set nil. |
senderUserIds |
Returns messages whose sender user id matches sender user ids. |
completionHandler |
The handler block to execute. The |
Availability
3.0.106
Declared In
SBDBaseChannel.h
– getNextMessagesByMessageId:limit:reverse:messageType:customType:senderUserIds:includeMetaArray:completionHandler:
Gets the next messages by the message ID. The messages can have meta array. (Deprecated: 3.0.169 (Use getMessagesByMessageId:params:completionHandler:
instead.))
- (void)getNextMessagesByMessageId:(long long)messageId limit:(NSInteger)limit reverse:(BOOL)reverse messageType:(SBDMessageTypeFilter)messageType customType:(NSString *_Nullable)customType senderUserIds:(NSArray<NSString*> *_Nullable)senderUserIds includeMetaArray:(BOOL)includeMetaArray completionHandler:(nullable void ( ^ ) ( NSArray<SBDBaseMessage*> *_Nullable messages , SBDError *_Nullable error ))completionHandler
Parameters
messageId |
The standard message ID to load messages. |
---|---|
limit |
The limit for the number of messages. The returned messages could be more than this number if there are messages which have the same timestamp. |
reverse |
If YES, the latest message is the index 0. |
messageType |
Message type to filter messages. |
customType |
Custom type to filter messages. If filtering isn’t required, set nil. |
senderUserIds |
Returns messages whose sender user id matches sender user ids. |
includeMetaArray |
If YES, the |
completionHandler |
The handler block to execute. The |
Availability
3.0.116
Declared In
SBDBaseChannel.h
– getNextMessagesByMessageId:limit:reverse:messageType:customType:senderUserIds:includeMetaArray:includeReactions:completionHandler:
Gets the next messages by the message ID with filters of limit, reverse, message type, custom type, sender user ids, include meta array, and include reactions. (Deprecated: 3.0.175 (Use getMessagesByMessageId:params:completionHandler:
instead.))
- (void)getNextMessagesByMessageId:(long long)messageId limit:(NSInteger)limit reverse:(BOOL)reverse messageType:(SBDMessageTypeFilter)messageType customType:(NSString *_Nullable)customType senderUserIds:(NSArray<NSString*> *_Nullable)senderUserIds includeMetaArray:(BOOL)includeMetaArray includeReactions:(BOOL)includeReactions completionHandler:(nullable void ( ^ ) ( NSArray<SBDBaseMessage*> *_Nullable messages , SBDError *_Nullable error ))completionHandler
Parameters
messageId |
The standard message ID to load messages. |
---|---|
limit |
The limit for the number of messages. The returned messages could be more than this number if there are messages which have the same timestamp. |
reverse |
If YES, the latest message is the index 0. |
messageType |
Message type to filter messages. |
customType |
Custom type to filter messages. If filtering isn’t required, set nil. |
senderUserIds |
Returns messages whose sender user id matches sender user ids. |
includeMetaArray |
If YES, the |
includeReactions |
If YES, the |
completionHandler |
The handler block to execute. The |
Availability
3.0.169
Declared In
SBDBaseChannel.h
– getNextMessagesByMessageId:inclusiveTimestamp:limit:reverse:messageType:customType:senderUserIds:includeMetaArray:includeReactions:completionHandler:
Gets the next messages by the message ID with filters of limit, reverse, message type, custom type, sender user ids, include meta array, and include reactions. (Deprecated: 3.0.231 (Use getMessagesByMessageId:params:completionHandler:
instead.))
- (void)getNextMessagesByMessageId:(long long)messageId inclusiveTimestamp:(BOOL)inclusiveTimestamp limit:(NSInteger)limit reverse:(BOOL)reverse messageType:(SBDMessageTypeFilter)messageType customType:(NSString *_Nullable)customType senderUserIds:(NSArray<NSString*> *_Nullable)senderUserIds includeMetaArray:(BOOL)includeMetaArray includeReactions:(BOOL)includeReactions completionHandler:(nullable void ( ^ ) ( NSArray<SBDBaseMessage*> *_Nullable messages , SBDError *_Nullable error ))completionHandler
Parameters
messageId |
The standard message ID to load messages. |
---|---|
inclusiveTimestamp |
Whether the response has messages including timestamp or not. If true (YES), results contain messages that created at the timestamp. If false (NO), results have messages that created after the timestamp |
limit |
The limit for the number of messages. The returned messages could be more than this number if there are messages which have the same timestamp. |
reverse |
If YES, the latest message is the index 0. |
messageType |
Message type to filter messages. |
customType |
Custom type to filter messages. If filtering isn’t required, set nil. |
senderUserIds |
Returns messages whose sender user id matches sender user ids. |
includeMetaArray |
If YES, the |
includeReactions |
If YES, the |
completionHandler |
The handler block to execute. The |
Availability
3.0.175
Declared In
SBDBaseChannel.h
– getPreviousMessagesByMessageId:limit:reverse:completionHandler:
Gets the previous messages by the message ID with a limit and ordering. (Deprecated: 3.0.40. (Use getMessagesByMessageId:params:completionHandler:
instead.))
- (void)getPreviousMessagesByMessageId:(long long)messageId limit:(NSInteger)limit reverse:(BOOL)reverse completionHandler:(nullable void ( ^ ) ( NSArray<SBDBaseMessage*> *_Nullable messages , SBDError *_Nullable error ))completionHandler
Parameters
messageId |
The standard message ID to load messages. |
---|---|
limit |
The limit for the number of messages. The returned messages could be more than this number if there are messages which have the same timestamp. |
reverse |
If yes, the latest message is the index 0. |
completionHandler |
The handler block to execute. The |
Declared In
SBDBaseChannel.h
– getPreviousMessagesByMessageId:limit:reverse:messageType:customType:completionHandler:
Gets the previous messages by the message ID with a limit and ordering. (Deprecated: 3.0.231 (Use getMessagesByMessageId:params:completionHandler:
instead.))
- (void)getPreviousMessagesByMessageId:(long long)messageId limit:(NSInteger)limit reverse:(BOOL)reverse messageType:(SBDMessageTypeFilter)messageType customType:(NSString *_Nullable)customType completionHandler:(nullable void ( ^ ) ( NSArray<SBDBaseMessage*> *_Nullable messages , SBDError *_Nullable error ))completionHandler
Parameters
messageId |
The standard message ID to load messages. |
---|---|
limit |
The limit for the number of messages. The returned messages could be more than this number if there are messages which have the same timestamp. |
reverse |
If yes, the latest message is the index 0. |
messageType |
Message type to filter messages. |
customType |
Custom type to filter messages. If filtering isn’t required, set nil. |
completionHandler |
The handler block to execute. The |
Declared In
SBDBaseChannel.h
– getPreviousMessagesByMessageId:limit:reverse:messageType:customType:senderUserIds:completionHandler:
Gets the previous messages by the message ID with a limit and ordering. (Deprecated: 3.0.231 (Use getMessagesByMessageId:params:completionHandler:
instead.))
- (void)getPreviousMessagesByMessageId:(long long)messageId limit:(NSInteger)limit reverse:(BOOL)reverse messageType:(SBDMessageTypeFilter)messageType customType:(NSString *_Nullable)customType senderUserIds:(NSArray<NSString*> *_Nullable)senderUserIds completionHandler:(nullable void ( ^ ) ( NSArray<SBDBaseMessage*> *_Nullable messages , SBDError *_Nullable error ))completionHandler
Parameters
messageId |
The standard message ID to load messages. |
---|---|
limit |
The limit for the number of messages. The returned messages could be more than this number if there are messages which have the same timestamp. |
reverse |
If yes, the latest message is the index 0. |
messageType |
Message type to filter messages. |
customType |
Custom type to filter messages. If filtering isn’t required, set nil. |
senderUserIds |
Returns messages whose sender user id matches sender user ids. |
completionHandler |
The handler block to execute. The |
Availability
3.0.106
Declared In
SBDBaseChannel.h
– getPreviousMessagesByMessageId:limit:reverse:messageType:customType:senderUserIds:includeMetaArray:completionHandler:
Gets the previous messages by the message ID. The messages can have meta array. (Deprecated: 3.0.169 (Use getMessagesByMessageId:params:completionHandler:
instead.))
- (void)getPreviousMessagesByMessageId:(long long)messageId limit:(NSInteger)limit reverse:(BOOL)reverse messageType:(SBDMessageTypeFilter)messageType customType:(NSString *_Nullable)customType senderUserIds:(NSArray<NSString*> *_Nullable)senderUserIds includeMetaArray:(BOOL)includeMetaArray completionHandler:(nullable void ( ^ ) ( NSArray<SBDBaseMessage*> *_Nullable messages , SBDError *_Nullable error ))completionHandler
Parameters
messageId |
The standard message ID to load messages. |
---|---|
limit |
The limit for the number of messages. The returned messages could be more than this number if there are messages which have the same timestamp. |
reverse |
If YES, the latest message is the index 0. |
messageType |
Message type to filter messages. |
customType |
Custom type to filter messages. If filtering isn’t required, set nil. |
senderUserIds |
Returns messages whose sender user id matches sender user ids. |
includeMetaArray |
If YES, the |
completionHandler |
The handler block to execute. The |
Availability
3.0.116
Declared In
SBDBaseChannel.h
– getPreviousMessagesByMessageId:limit:reverse:messageType:customType:senderUserIds:includeMetaArray:includeReactions:completionHandler:
Gets the previous messages by the message ID with filters of prev limit, next limit, reverse, message type, custom type, sender user ids, include meta array, and include reactions. (Deprecated: 3.0.175 (Use getMessagesByMessageId:params:completionHandler:
instead.))
- (void)getPreviousMessagesByMessageId:(long long)messageId limit:(NSInteger)limit reverse:(BOOL)reverse messageType:(SBDMessageTypeFilter)messageType customType:(NSString *_Nullable)customType senderUserIds:(NSArray<NSString*> *_Nullable)senderUserIds includeMetaArray:(BOOL)includeMetaArray includeReactions:(BOOL)includeReactions completionHandler:(nullable void ( ^ ) ( NSArray<SBDBaseMessage*> *_Nullable messages , SBDError *_Nullable error ))completionHandler
Parameters
messageId |
The standard message ID to load messages. |
---|---|
limit |
The limit for the number of messages. The returned messages could be more than this number if there are messages which have the same timestamp. |
reverse |
If YES, the latest message is the index 0. |
messageType |
Message type to filter messages. |
customType |
Custom type to filter messages. If filtering isn’t required, set nil. |
senderUserIds |
Returns messages whose sender user id matches sender user ids. |
includeMetaArray |
If YES, the |
includeReactions |
If YES, the |
completionHandler |
The handler block to execute. The |
Availability
3.0.169
Declared In
SBDBaseChannel.h
– getPreviousMessagesByMessageId:inclusiveTimestamp:limit:reverse:messageType:customType:senderUserIds:includeMetaArray:includeReactions:completionHandler:
Gets the previous messages by the message ID with filters of prev limit, next limit, reverse, message type, custom type, sender user ids, include meta array, and include reactions. (Deprecated: 3.0.231 (Use getMessagesByMessageId:params:completionHandler:
instead.))
- (void)getPreviousMessagesByMessageId:(long long)messageId inclusiveTimestamp:(BOOL)inclusiveTimestamp limit:(NSInteger)limit reverse:(BOOL)reverse messageType:(SBDMessageTypeFilter)messageType customType:(NSString *_Nullable)customType senderUserIds:(NSArray<NSString*> *_Nullable)senderUserIds includeMetaArray:(BOOL)includeMetaArray includeReactions:(BOOL)includeReactions completionHandler:(nullable void ( ^ ) ( NSArray<SBDBaseMessage*> *_Nullable messages , SBDError *_Nullable error ))completionHandler
Parameters
messageId |
The standard message ID to load messages. |
---|---|
inclusiveTimestamp |
Whether the response has messages including timestamp or not. If true (YES), results contain messages that created at the timestamp. If false (NO), results have messages that created after the timestamp |
limit |
The limit for the number of messages. The returned messages could be more than this number if there are messages which have the same timestamp. |
reverse |
If YES, the latest message is the index 0. |
messageType |
Message type to filter messages. |
customType |
Custom type to filter messages. If filtering isn’t required, set nil. |
senderUserIds |
Returns messages whose sender user id matches sender user ids. |
includeMetaArray |
If YES, the |
includeReactions |
If YES, the |
completionHandler |
The handler block to execute. The |
Availability
3.0.175
Declared In
SBDBaseChannel.h
– getPreviousAndNextMessagesByMessageId:prevLimit:nextLimit:reverse:completionHandler:
Gets the previous and next message by the message ID with a limit and ordering. (Deprecated: 3.0.40. (Use getMessagesByMessageId:params:completionHandler:
instead.))
- (void)getPreviousAndNextMessagesByMessageId:(long long)messageId prevLimit:(NSInteger)prevLimit nextLimit:(NSInteger)nextLimit reverse:(BOOL)reverse completionHandler:(nullable void ( ^ ) ( NSArray<SBDBaseMessage*> *_Nullable messages , SBDError *_Nullable error ))completionHandler
Parameters
messageId |
The standard message ID to load messages. |
---|---|
prevLimit |
The previous limit for the number of messages. The returned messages could be more than this number if there are messages which have the same timestamp. |
nextLimit |
The next limit for the number of messages. The returned messages could be more than this number if there are messages which have the same timestamp. |
reverse |
If yes, the latest message is the index 0. |
completionHandler |
The handler block to execute. The |
Declared In
SBDBaseChannel.h
– getPreviousAndNextMessagesByMessageId:prevLimit:nextLimit:reverse:messageType:customType:completionHandler:
Gets the previous and next message by the message ID with a limit and ordering. (Deprecated: 3.0.231 (Use getMessagesByMessageId:params:completionHandler:
instead.))
- (void)getPreviousAndNextMessagesByMessageId:(long long)messageId prevLimit:(NSInteger)prevLimit nextLimit:(NSInteger)nextLimit reverse:(BOOL)reverse messageType:(SBDMessageTypeFilter)messageType customType:(NSString *_Nullable)customType completionHandler:(nullable void ( ^ ) ( NSArray<SBDBaseMessage*> *_Nullable messages , SBDError *_Nullable error ))completionHandler
Parameters
messageId |
The standard message ID to load messages. |
---|---|
prevLimit |
The previous limit for the number of messages. The returned messages could be more than this number if there are messages which have the same timestamp. |
nextLimit |
The next limit for the number of messages. The returned messages could be more than this number if there are messages which have the same timestamp. |
reverse |
If yes, the latest message is the index 0. |
messageType |
Message type to filter messages. |
customType |
Custom type to filter messages. If filtering isn’t required, set nil. |
completionHandler |
The handler block to execute. The |
Declared In
SBDBaseChannel.h
– getPreviousAndNextMessagesByMessageId:prevLimit:nextLimit:reverse:messageType:customType:senderUserIds:completionHandler:
Gets the previous and next message by the message ID with a limit and ordering. (Deprecated: 3.0.231 (Use getMessagesByMessageId:params:completionHandler:
instead.))
- (void)getPreviousAndNextMessagesByMessageId:(long long)messageId prevLimit:(NSInteger)prevLimit nextLimit:(NSInteger)nextLimit reverse:(BOOL)reverse messageType:(SBDMessageTypeFilter)messageType customType:(NSString *_Nullable)customType senderUserIds:(NSArray<NSString*> *_Nullable)senderUserIds completionHandler:(nullable void ( ^ ) ( NSArray<SBDBaseMessage*> *_Nullable messages , SBDError *_Nullable error ))completionHandler
Parameters
messageId |
The standard message ID to load messages. |
---|---|
prevLimit |
The previous limit for the number of messages. The returned messages could be more than this number if there are messages which have the same timestamp. |
nextLimit |
The next limit for the number of messages. The returned messages could be more than this number if there are messages which have the same timestamp. |
reverse |
If yes, the latest message is the index 0. |
messageType |
Message type to filter messages. |
customType |
Custom type to filter messages. If filtering isn’t required, set nil. |
senderUserIds |
Returns messages whose sender user id matches sender user ids. |
completionHandler |
The handler block to execute. The |
Availability
3.0.106
Declared In
SBDBaseChannel.h
– getPreviousAndNextMessagesByMessageId:prevLimit:nextLimit:reverse:messageType:customType:senderUserIds:includeMetaArray:completionHandler:
Gets the previous and next message by the message ID with a limit and ordering. (Deprecated: 3.0.169 (Use getMessagesByMessageId:params:completionHandler:
instead.))
- (void)getPreviousAndNextMessagesByMessageId:(long long)messageId prevLimit:(NSInteger)prevLimit nextLimit:(NSInteger)nextLimit reverse:(BOOL)reverse messageType:(SBDMessageTypeFilter)messageType customType:(NSString *_Nullable)customType senderUserIds:(NSArray<NSString*> *_Nullable)senderUserIds includeMetaArray:(BOOL)includeMetaArray completionHandler:(nullable void ( ^ ) ( NSArray<SBDBaseMessage*> *_Nullable messages , SBDError *_Nullable error ))completionHandler
Parameters
messageId |
The standard message ID to load messages. |
---|---|
prevLimit |
The previous limit for the number of messages. The returned messages could be more than this number if there are messages which have the same timestamp. |
nextLimit |
The next limit for the number of messages. The returned messages could be more than this number if there are messages which have the same timestamp. |
reverse |
If YES, the latest message is the index 0. |
messageType |
Message type to filter messages. |
customType |
Custom type to filter messages. If filtering isn’t required, set nil. |
senderUserIds |
Returns messages whose sender user id matches sender user ids. |
includeMetaArray |
If YES, the |
completionHandler |
The handler block to execute. The |
Availability
3.0.116
Declared In
SBDBaseChannel.h
– getPreviousAndNextMessagesByMessageId:prevLimit:nextLimit:reverse:messageType:customType:senderUserIds:includeMetaArray:includeReactions:completionHandler:
Gets the previous and next message by the message ID with with filters of prev limit, next limit, reverse, message type, custom type, sender user ids, include meta array, and include reactions. (Deprecated: 3.0.231 (Use getMessagesByMessageId:params:completionHandler:
instead.))
- (void)getPreviousAndNextMessagesByMessageId:(long long)messageId prevLimit:(NSInteger)prevLimit nextLimit:(NSInteger)nextLimit reverse:(BOOL)reverse messageType:(SBDMessageTypeFilter)messageType customType:(NSString *_Nullable)customType senderUserIds:(NSArray<NSString*> *_Nullable)senderUserIds includeMetaArray:(BOOL)includeMetaArray includeReactions:(BOOL)includeReactions completionHandler:(nullable void ( ^ ) ( NSArray<SBDBaseMessage*> *_Nullable messages , SBDError *_Nullable error ))completionHandler
Parameters
messageId |
The standard message ID to load messages. |
---|---|
prevLimit |
The previous limit for the number of messages. The returned messages could be more than this number if there are messages which have the same timestamp. |
nextLimit |
The next limit for the number of messages. The returned messages could be more than this number if there are messages which have the same timestamp. |
reverse |
If YES, the latest message is the index 0. |
messageType |
Message type to filter messages. |
customType |
Custom type to filter messages. If filtering isn’t required, set nil. |
senderUserIds |
Returns messages whose sender user id matches sender user ids. |
includeMetaArray |
If YES, the |
includeReactions |
If YES, the |
completionHandler |
The handler block to execute. The |
Availability
3.0.169
Declared In
SBDBaseChannel.h
– getMessagesByTimestamp:params:completionHandler:
Retrieves previous or next messages based on a specified timestamp in the channel.
- (void)getMessagesByTimestamp:(long long)timestamp params:(nonnull SBDMessageListParams *)params completionHandler:(nullable void ( ^ ) ( NSArray<SBDBaseMessage*> *_Nullable messages , SBDError *_Nullable error ))completionHandler
Parameters
timestamp |
Specifies the timestamp to be the reference point for messages to retrieve, in Unix milliseconds format. Messages sent before or after the timestamp can be retrieved. |
---|---|
params |
Contains a set of parameters you can set regarding the messages in the results. |
completionHandler |
The handler block to be executed. The |
Availability
3.0.181
Declared In
SBDBaseChannel.h
– getMessagesByMessageId:params:completionHandler:
Retrieves previous or next messages based on their message ID in a specific channel.
- (void)getMessagesByMessageId:(long long)messageId params:(nonnull SBDMessageListParams *)params completionHandler:(nullable void ( ^ ) ( NSArray<SBDBaseMessage*> *_Nullable messages , SBDError *_Nullable error ))completionHandler
Parameters
messageId |
Specifies the message ID to be the reference point for messages to retrieve. Messages sent before or after the message with the matching message ID can be retrieved. |
---|---|
params |
Contains a set of parameters you can set regarding the messages in the results. |
completionHandler |
The handler block to be executed. The |
Availability
3.0.181
Declared In
SBDBaseChannel.h
+ buildFromSerializedData:
Builds a base channel object from serialized data.
+ (nullable instancetype)buildFromSerializedData:(NSData *_Nonnull)data
Parameters
data |
Serialized data. |
---|
Return Value
SBDBaseChannel object.
Declared In
SBDBaseChannel.h
– serialize
Serializes base channel object.
- (nullable NSData *)serialize
Return Value
Serialized data.
Declared In
SBDBaseChannel.h
+ cancelUploadingFileMessageWithRequestId:completionHandler:
Cancels the file message uploading.
+ (void)cancelUploadingFileMessageWithRequestId:(NSString *_Nonnull)requestId completionHandler:(nullable void ( ^ ) ( BOOL result , SBDError *_Nullable error ))completionHandler
Parameters
requestId |
The request ID of the file message that is been uploading. |
---|---|
completionHandler |
The handler block to execute. If the |
Declared In
SBDBaseChannel.h
– copyUserMessage:toTargetChannel:completionHandler:
Copies a user message to the target channel.
- (nonnull SBDUserMessage *)copyUserMessage:(SBDUserMessage *_Nonnull)message toTargetChannel:(SBDBaseChannel *_Nonnull)targetChannel completionHandler:(nullable void ( ^ ) ( SBDUserMessage *_Nullable userMessage , SBDError *_Nullable error ))completionHandler
Parameters
message |
User message object. |
---|---|
targetChannel |
Target channel object. |
completionHandler |
The handler block to execute. The |
Return Value
Returns the temporary user message with a request ID. It doesn’t have a message ID.
Declared In
SBDBaseChannel.h
– copyFileMessage:toTargetChannel:completionHandler:
Copies a file message to the target channel.
- (nonnull SBDFileMessage *)copyFileMessage:(SBDFileMessage *_Nonnull)message toTargetChannel:(SBDBaseChannel *_Nonnull)targetChannel completionHandler:(nullable void ( ^ ) ( SBDFileMessage *_Nullable fileMessage , SBDError *_Nullable error ))completionHandler
Parameters
message |
File message object. |
---|---|
targetChannel |
Target channel object. |
completionHandler |
The handler block to execute. The |
Return Value
Returns the temporary file message with a request ID. It doesn’t have a message ID.
Declared In
SBDBaseChannel.h
– getMessageChangeLogsWithToken:completionHandler:
Gets the changelogs of the messages with token. (Deprecated: 3.0.231 (Use getMessageChangeLogsSinceToken:params:completionHandler:
instead.))
- (void)getMessageChangeLogsWithToken:(NSString *_Nullable)token completionHandler:(nullable void ( ^ ) ( NSArray<SBDBaseMessage*> *_Nullable updatedMessages , NSArray<NSNumber*> *_Nullable deletedMessageIds , BOOL hasMore , NSString *_Nullable token , SBDError *_Nullable error ))completionHandler
Parameters
token |
The token that is used to get more changelogs. |
---|---|
completionHandler |
The handler block to execute. The |
Declared In
SBDBaseChannel.h
– getMessageChangeLogsWithToken:includeMetaArray:completionHandler:
Gets the changelogs of the messages with token and meta array (Deprecated: 3.0.231 (Use getMessageChangeLogsSinceToken:params:completionHandler:
instead.))
- (void)getMessageChangeLogsWithToken:(NSString *_Nullable)token includeMetaArray:(BOOL)includeMetaArray completionHandler:(nullable void ( ^ ) ( NSArray<SBDBaseMessage*> *_Nullable updatedMessages , NSArray<NSNumber*> *_Nullable deletedMessageIds , BOOL hasMore , NSString *_Nullable token , SBDError *_Nullable error ))completionHandler
Parameters
token |
The token that is used to get more changelogs. |
---|---|
includeMetaArray |
If YES, the |
completionHandler |
The handler block to execute. The |
Availability
3.0.116
Declared In
SBDBaseChannel.h
– getMessageChangeLogsWithToken:includeMetaArray:includeReactions:completionHandler:
Gets the changelogs of the messages with token, meta array, and reactions. (Deprecated: 3.0.231 (Use getMessageChangeLogsSinceToken:params:completionHandler:
instead.))
- (void)getMessageChangeLogsWithToken:(NSString *_Nullable)token includeMetaArray:(BOOL)includeMetaArray includeReactions:(BOOL)includeReactions completionHandler:(nullable void ( ^ ) ( NSArray<SBDBaseMessage*> *_Nullable updatedMessages , NSArray<NSNumber*> *_Nullable deletedMessageIds , BOOL hasMore , NSString *_Nullable token , SBDError *_Nullable error ))completionHandler
Parameters
token |
The token that is used to get more changelogs. |
---|---|
includeMetaArray |
If YES, the |
includeReactions |
If YES, the |
completionHandler |
The handler block to execute. The |
Availability
3.0.169
Declared In
SBDBaseChannel.h
– getMessageChangeLogsByTimestamp:completionHandler:
Requests updated messages and deleted message IDs by the timestamp in this channel. (Deprecated: 3.0.231 (Use getMessageChangeLogsSinceTimestamp: params:completionHandler:
))
- (void)getMessageChangeLogsByTimestamp:(long long)timestamp completionHandler:(nonnull void ( ^ ) ( NSArray<SBDBaseMessage*> *_Nullable updatedMessages , NSArray<NSNumber*> *_Nullable deletedMessageIds , BOOL hasMore , NSString *_Nullable token , SBDError *_Nullable error ))completionHandler
Parameters
timestamp |
The number of milli-seconds(msec). Requests changelogs by that time. This value must not be negative. |
---|---|
completionHandler |
The handler block to execute. The |
Availability
3.0.122
Declared In
SBDBaseChannel.h
– getMessageChangeLogsByTimestamp:includeMetaArray:completionHandler:
Requests updated messages contains metaarray and deleted message IDs by the timestamp in this channel. (Deprecated: 3.0.231 (Use getMessageChangeLogsSinceTimestamp: params:completionHandler:
))
- (void)getMessageChangeLogsByTimestamp:(long long)timestamp includeMetaArray:(BOOL)includeMetaArray completionHandler:(nonnull void ( ^ ) ( NSArray<SBDBaseMessage*> *_Nullable updatedMessages , NSArray<NSNumber*> *_Nullable deletedMessageIds , BOOL hasMore , NSString *_Nullable token , SBDError *_Nullable error ))completionHandler
Parameters
timestamp |
The number of milli-seconds(msec). Requests changelogs by that time. This value must not be negative. |
---|---|
includeMetaArray |
If YES, the |
completionHandler |
The handler block to execute. The |
Availability
3.0.122
Declared In
SBDBaseChannel.h
– getMessageChangeLogsByTimestamp:includeMetaArray:includeReactions:completionHandler:
Requests updated messages contains metaarray and reactions, and deleted message IDs by the timestamp in this channel. (Deprecated: 3.0.231 (Use getMessageChangeLogsSinceTimestamp: params:completionHandler:
))
- (void)getMessageChangeLogsByTimestamp:(long long)timestamp includeMetaArray:(BOOL)includeMetaArray includeReactions:(BOOL)includeReactions completionHandler:(nonnull void ( ^ ) ( NSArray<SBDBaseMessage*> *_Nullable updatedMessages , NSArray<NSNumber*> *_Nullable deletedMessageIds , BOOL hasMore , NSString *_Nullable token , SBDError *_Nullable error ))completionHandler
Parameters
timestamp |
The number of milli-seconds(msec). Requests changelogs by that time. This value must not be negative. |
---|---|
includeMetaArray |
If YES, the |
includeReactions |
If YES, the |
completionHandler |
The handler block to execute. The |
Availability
3.0.169
Declared In
SBDBaseChannel.h
– getMessageChangeLogsSinceToken:params:completionHandler:
Retrieves the changelogs since a specified token regarding the updated messages or the unique IDs of deleted messages in the channel.
- (void)getMessageChangeLogsSinceToken:(nullable NSString *)token params:(nonnull SBDMessageChangeLogsParams *)params completionHandler:(nonnull void ( ^ ) ( NSArray<SBDBaseMessage*> *_Nullable updatedMessages , NSArray<NSNumber*> *_Nullable deletedMessageIds , BOOL hasMore , NSString *_Nullable token , SBDError *_Nullable error ))completionHandler
Parameters
token |
Specifies the token to be the reference point for the changelogs to retrieve. |
---|---|
params |
Contains a set of parameters you can set regarding the messages in the results. |
completionHandler |
The handler block to execute. The |
Availability
3.0.181
Declared In
SBDBaseChannel.h
– getMessageChangeLogsSinceTimestamp:params:completionHandler:
Retrieves the changelogs since a specified timestamp, in Unix milliseconds format, regarding the updated messages or the unique IDs of deleted messages in the channel.
- (void)getMessageChangeLogsSinceTimestamp:(long long)timestamp params:(nonnull SBDMessageChangeLogsParams *)params completionHandler:(nonnull void ( ^ ) ( NSArray<SBDBaseMessage*> *_Nullable updatedMessages , NSArray<NSNumber*> *_Nullable deletedMessageIds , BOOL hasMore , NSString *_Nullable token , SBDError *_Nullable error ))completionHandler
Parameters
timestamp |
Specifies the timestamp to be the reference point for changelogs to retrieve, in Unix milliseconds format. |
---|---|
params |
Contains a set of parameters you can set regarding the messages in the results. |
completionHandler |
The handler block to execute. The |
Availability
3.0.181
Declared In
SBDBaseChannel.h
– createMessageMetaArrayKeysWithMessage:keys:completionHandler:
Creates keys of meta array for the message.
- (void)createMessageMetaArrayKeysWithMessage:(nonnull SBDBaseMessage *)message keys:(nonnull NSArray<NSString*> *)keys completionHandler:(nullable void ( ^ ) ( SBDBaseMessage *_Nullable message , SBDError *_Nullable error ))completionHandler
Parameters
message |
The message object. This method creates |
---|---|
keys |
Keys of meta array. |
completionHandler |
The handler block to execute. The |
Availability
3.0.116
Declared In
SBDBaseChannel.h
– deleteMessageMetaArrayKeysWithMessage:keys:completionHandler:
Deletes keys from meta array of the message.
- (void)deleteMessageMetaArrayKeysWithMessage:(nonnull SBDBaseMessage *)message keys:(nonnull NSArray<NSString*> *)keys completionHandler:(nullable void ( ^ ) ( SBDBaseMessage *_Nullable message , SBDError *_Nullable error ))completionHandler
Parameters
message |
The message object. This method deletes keys of meta array of it. |
---|---|
keys |
Keys to be deleted. |
completionHandler |
The handler block to execute. |
Availability
3.0.116
Declared In
SBDBaseChannel.h
– addMessageMetaArrayValuesWithMessage:keyValues:completionHandler:
Adds meta array to the message.
- (void)addMessageMetaArrayValuesWithMessage:(nonnull SBDBaseMessage *)message keyValues:(nonnull NSDictionary<NSString*,NSArray<NSString*> *> *)keyValues completionHandler:(nullable void ( ^ ) ( SBDBaseMessage *_Nullable message , SBDError *_Nullable error ))completionHandler
Parameters
message |
The message object. This method adds pairs of key and value to this message. |
---|---|
keyValues |
Pairs of key-value to be added. |
completionHandler |
The handler block to execute. |
Availability
3.0.116
Declared In
SBDBaseChannel.h
– addMessageMetaArrayValuesWithMessage:metaArrays:completionHandler:
NSArraySBDMessageMetaArray > metaArrays = adding_meta_arrays; [channel addMessageMetaArrayValuesWithMessage:message metaArrays:metaArrays completionHandler:^(SBDBaseMessage * Nullable message, SBDError * Nullable error) { // added metaArrays into the message. }]; }]; @endcode
- (void)addMessageMetaArrayValuesWithMessage:(nonnull SBDBaseMessage *)message metaArrays:(nonnull NSArray<SBDMessageMetaArray*> *)metaArrays completionHandler:(nullable SBDBaseMessageHandler)completionHandler
Declared In
SBDBaseChannel.h
– removeMessageMetaArrayValuesWithMessage:keyValues:completionHandler:
Removes meta array from the message.
- (void)removeMessageMetaArrayValuesWithMessage:(nonnull SBDBaseMessage *)message keyValues:(nonnull NSDictionary<NSString*,NSArray<NSString*> *> *)keyValues completionHandler:(nullable void ( ^ ) ( SBDBaseMessage *_Nullable message , SBDError *_Nullable error ))completionHandler
Parameters
message |
The message object. This method removes pairs of key and value from this message. |
---|---|
keyValues |
Pairs of key-value to be removed. |
completionHandler |
The handler block to execute. |
Availability
3.0.116
Declared In
SBDBaseChannel.h
– removeMessageMetaArrayValuesWithMessage:metaArrays:completionHandler:
Removes the array of meta array from the message.
- (void)removeMessageMetaArrayValuesWithMessage:(nonnull SBDBaseMessage *)message metaArrays:(nonnull NSArray<SBDMessageMetaArray*> *)metaArrays completionHandler:(nullable SBDBaseMessageHandler)completionHandler
Parameters
message |
The message instance. The metaArrays will removed from the message. |
---|---|
metaArrays |
An array of message meta array will be removed from the message. the string of the value in the metaArray MUST exist with same key. |
completionHandler |
The handler block to execute after removing message meta arrays.
The |
Availability
3.0.148 @code SBDGroupChannel channel; SBDUserMessageParams params = [[SBDUserMessageParams alloc] initWithMessage:message]; params.metaArrayKeys = key_array; [channel sendUserMessageWithParams:params completionHandler:^(SBDUserMessage * Nullable message, SBDError * Nullable error) { // message has metaArrays NSArraySBDMessageMetaArray > metaArrays = removing_meta_arrays; [channel removeMessageMetaArrayValuesWithMessage:message metaArrays:metaArrays completionHandler:^(SBDBaseMessage * Nullable message, SBDError * Nullable error) { // removed metaArrays into the message. }]; }]; @endcode
Discussion
The metaArrays
are removed from the message.
If a key in the metaArrays has an emtpy array of the value, the key will be removed.
If not, the value of the messageMetaArray will be removed from the message.
The order of the meta array is guaranteed.
Declared In
SBDBaseChannel.h
– getMyMutedInfoWithCompletionHandler:
Gets the current user’s muted information in this channel.
- (void)getMyMutedInfoWithCompletionHandler:(nullable void ( ^ ) ( BOOL isMuted , NSString *_Nonnull description , long long startAt , long long endAt , long long remainingDuration , SBDError *_Nullable error ))completionHandler
Parameters
completionHandler |
The handler block to be executed. |
---|
Availability
3.0.118
Declared In
SBDBaseChannel.h
– reportUser:reportCategory:reportDescription:completionHandler:
Reports a user in a channel of inappropriate activities.
- (void)reportUser:(nonnull SBDUser *)offendingUser reportCategory:(SBDReportCategory)reportCategory reportDescription:(nullable NSString *)reportDescription completionHandler:(nullable SBDErrorHandler)completionHandler
Parameters
offendingUser |
The user who is being reported. |
---|---|
reportCategory |
The category in which the report is being submitted. Valid choices are ‘suspicious’, ‘harassing’, ‘spam’, and ‘inappropriate’. |
reportDescription |
An open ended description for why the report is being submitted. |
completionHandler |
The handler block to execute. |
Availability
3.0.154
Declared In
SBDBaseChannel.h
– reportChannelWithCategory:reportDescription:completionHandler:
Reports current channel instance of inappropriate activities.
- (void)reportChannelWithCategory:(SBDReportCategory)reportCategory reportDescription:(nullable NSString *)reportDescription completionHandler:(nullable SBDErrorHandler)completionHandler
Parameters
reportCategory |
The category in which the report is being submitted. Valid choices are ‘suspicious’, ‘harassing’, ‘spam’, and ‘inappropriate’. |
---|---|
reportDescription |
An open ended description for why the report is being submitted. |
completionHandler |
The handler block to execute. |
Availability
3.0.154
Declared In
SBDBaseChannel.h
– reportMessage:reportCategory:reportDescription:completionHandler:
The message object which is being reported.
- (void)reportMessage:(nonnull SBDBaseMessage *)message reportCategory:(SBDReportCategory)reportCategory reportDescription:(nullable NSString *)reportDescription completionHandler:(nullable SBDErrorHandler)completionHandler
Parameters
message |
The message object which is being reported. |
---|---|
reportCategory |
The category in which the report is being submitted. Valid choices are ‘suspicious’, ‘harassing’, ‘spam’, and ‘inappropriate’. |
reportDescription |
An open ended description for why the report is being submitted. |
completionHandler |
The handler block to execute. |
Availability
3.0.154
Declared In
SBDBaseChannel.h
– addReactionWithMessage:key:completionHandler:
Adds a reaction to a message.
- (void)addReactionWithMessage:(nonnull SBDBaseMessage *)message key:(nonnull NSString *)key completionHandler:(nullable void ( ^ ) ( SBDReactionEvent *_Nullable reactionEvent , SBDError *_Nullable error ))completionHandler
Parameters
message |
The message object that the reaction will be added. |
---|---|
key |
The reaction key to be added. |
completionHandler |
The handler block to be executed. If succeeded, the |
Availability
3.0.169
Discussion
This method adds a reaction to a existing message. If the requestState
of SBDUserMessage
or the requestState
of SBDFileMessage
is not SBDMessageRequestStateSucceeded
, the error
in completionHandler
will not nil
.
Note: This is idempotent.
Note: This feature is only available in group channels.
Declared In
SBDBaseChannel.h
– deleteReactionWithMessage:key:completionHandler:
Deletes a reaction from a message.
- (void)deleteReactionWithMessage:(nonnull SBDBaseMessage *)message key:(nonnull NSString *)key completionHandler:(nullable void ( ^ ) ( SBDReactionEvent *_Nullable reactionEvent , SBDError *_Nullable error ))completionHandler
Parameters
message |
The message object that has the reaction key. |
---|---|
key |
The reaction key to be deleted. |
completionHandler |
The handler block to be executed. If succeeded, the |
Availability
3.0.169
Discussion
This method deletes a reaction from a existing message. If the requestState
of SBDUserMessage
or the requestState
of SBDFileMessage
is not SBDMessageRequestStateSucceeded
, the error
in completionHandler
will not nil
.
Note: This is idempotent.
Note: This feature is only available in group channels.
Declared In
SBDBaseChannel.h
– addOperatorsWithUserIds:completionHandler:
Adds operators to the channel.
- (void)addOperatorsWithUserIds:(nonnull NSArray<NSString*> *)userIds completionHandler:(nullable void ( ^ ) ( SBDError *_Nullable error ))completionHandler
Parameters
userIds |
The user IDs to be operators. |
---|---|
completionHandler |
The handler block to be executed. |
Availability
3.0.189
Declared In
SBDBaseChannel.h
– removeOperatorsWithUserIds:completionHandler:
Removes operators from the channel.
- (void)removeOperatorsWithUserIds:(nonnull NSArray<NSString*> *)userIds completionHandler:(nullable void ( ^ ) ( SBDError *_Nullable error ))completionHandler
Parameters
userIds |
The user IDs to be removed from the operators. |
---|---|
completionHandler |
The handler block to be executed. |
Availability
3.0.189
Declared In
SBDBaseChannel.h
– removeAllOperatorsWithCompletionHandler:
Removes all operators from the channel.
- (void)removeAllOperatorsWithCompletionHandler:(nullable void ( ^ ) ( SBDError *_Nullable error ))completionHandler
Parameters
completionHandler |
The handler block to be executed. |
---|
Availability
3.0.189
Declared In
SBDBaseChannel.h
– getCachedMetaData
Return cached channel meta data
- (nonnull NSDictionary<NSString*,NSString*> *)getCachedMetaData
Availability
3.0.216
Declared In
SBDBaseChannel.h