#import <IEMChatroomManager.h>
A class that manages the chatrooms.
◆ addAdmin:toChatroom:completion:
- (void) addAdmin: |
|
(NSString *_Nonnull) |
aAdmin |
toChatroom: |
|
(NSString *_Nonnull) |
aChatroomId |
completion: |
|
(void(^)(EMChatroom *_Nullable aChatroomp, EMError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
Adds a chatroom admin.
Only the chatroom owner can call this method.
This is an asynchronous method.
- Parameters
-
aAdmin | The new admin. |
aChatroomId | The chatroom ID. |
aCompletionBlock | The completion block, which contains the error message if the method call fails. |
◆ addAdmin:toChatroom:error:
- (EMChatroom *_Nullable) addAdmin: |
|
(NSString *_Nonnull) |
aAdmin |
toChatroom: |
|
(NSString *_Nonnull) |
aChatroomId |
error: |
|
(EMError **_Nullable) |
pError |
|
|
| |
|
required |
Adds a chatroom admin.
Only the chatroom owner can call this method.
This is a synchronous method and blocks the current thread.
- Parameters
-
aAdmin | The new admin. |
aChatroomId | The chatroom ID. |
pError | The error information if the method fails: Error. |
- Returns
- The chatroom instance. See EMChatroom.
◆ addDelegate:delegateQueue:
- (void) addDelegate: |
|
(id< EMChatroomManagerDelegate > _Nonnull) |
aDelegate |
delegateQueue: |
|
(dispatch_queue_t _Nullable) |
aQueue |
|
|
| |
|
required |
Adds the SDK delegate.
- Parameters
-
aDelegate | The delegate that you want to add: ChatroomManagerDelegate. |
aQueue | (Optional) The queue of calling the delegate methods. To run the app on the main thread, set this parameter as nil. |
◆ addWhiteListMembers:fromChatroom:completion:
- (void) addWhiteListMembers: |
|
(NSArray< NSString * > *_Nonnull) |
aMembers |
fromChatroom: |
|
(NSString *_Nonnull) |
aChatroomId |
completion: |
|
(void(^)(EMChatroom *_Nullable aChatroom, EMError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
Adds members to the allowlist.
Only the chatroom owner and admin can call this method.
This is an asynchronous method.
- Parameters
-
aMembers | The members to be added to the allowlist. |
aChatroomId | The chatroom ID. |
aCompletionBlock | The completion block, which contains the error message if the method call fails. |
◆ addWhiteListMembers:fromChatroom:error:
- (EMChatroom *_Nullable) addWhiteListMembers: |
|
(NSArray< NSString * > *_Nonnull) |
aMembers |
fromChatroom: |
|
(NSString *_Nonnull) |
aChatroomId |
error: |
|
(EMError **_Nullable) |
pError |
|
|
| |
|
required |
Adds users to the allowlist.
Only the chatroom owner and admin can call this method.
This is a synchronous method and blocks the current thread.
- Parameters
-
aMembers | The members to be added to the allowlist. |
aChatroomId | The chatroom ID. |
pError | The error information if the method fails: Error. |
- Returns
- The chatroom instance. See EMChatroom.
◆ blockMembers:fromChatroom:completion:
- (void) blockMembers: |
|
(NSArray< NSString * > *_Nonnull) |
aMembers |
fromChatroom: |
|
(NSString *_Nonnull) |
aChatroomId |
completion: |
|
(void(^)(EMChatroom *_Nullable aChatroom, EMError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
Adds users to the chatroom's blocklist.
Only the chatroom owner can call this method.
This is an asynchronous method.
- Parameters
-
aMembers | The users to be added to the chatroom. |
aChatroomId | The chatroom ID. |
aCompletionBlock | The completion block, which contains the error message if the method call fails. |
◆ blockMembers:fromChatroom:error:
- (EMChatroom *_Nullable) blockMembers: |
|
(NSArray< NSString * > *_Nonnull) |
aMembers |
fromChatroom: |
|
(NSString *_Nonnull) |
aChatroomId |
error: |
|
(EMError **_Nullable) |
pError |
|
|
| |
|
required |
Adds users to the chatroom's blocklist.
Only the chatroom owner can call this method.
This is a synchronous method and blocks the current thread.
- Parameters
-
aMembers | The users to be added to the blocklist. |
aChatroomId | The chatroom ID. |
pError | The error information if the method fails: Error. |
- Returns
- The chatroom instance.
◆ createChatroomWithSubject:description:invitees:message:maxMembersCount:completion:
- (void) createChatroomWithSubject: |
|
(NSString *_Nullable) |
aSubject |
description: |
|
(NSString *_Nullable) |
aDescription |
invitees: |
|
(NSArray< NSString * > *_Nullable) |
aInvitees |
message: |
|
(NSString *_Nullable) |
aMessage |
maxMembersCount: |
|
(NSInteger) |
aMaxMembersCount |
completion: |
|
(void(^)(EMChatroom *_Nullable aChatroom, EMError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
Creates a chatroom.
This is an asynchronous method.
- Parameters
-
aSubject | The subject of the chatroom. |
aDescription | The description of the chatroom. |
aInvitees | The members of the chatroom. Do not include the creator. |
aMessage | The invitation message. |
aMaxMembersCount | The maximum number of members in the chatroom. |
aCompletionBlock | The completion block, which contains the error message if the method call fails. |
◆ createChatroomWithSubject:description:invitees:message:maxMembersCount:error:
- (EMChatroom *_Nullable) createChatroomWithSubject: |
|
(NSString *_Nullable) |
aSubject |
description: |
|
(NSString *_Nullable) |
aDescription |
invitees: |
|
(NSArray< NSString * > *_Nullable) |
aInvitees |
message: |
|
(NSString *_Nullable) |
aMessage |
maxMembersCount: |
|
(NSInteger) |
aMaxMembersCount |
error: |
|
(EMError **_Nullable) |
pError |
|
|
| |
|
required |
Creates a chatroom.
This is a synchronous method and blocks the current thread.
- Parameters
-
aSubject | The subject of the chatroom. |
aDescription | The description of the chatroom. |
aInvitees | The members of the chatroom. Do not include the creator. |
aMessage | The invitation message. |
aMaxMembersCount | The maximum number of members in the chatroom. |
pError | The error information if the method fails: Error. |
- Returns
- The create chatroom. See EMChatroom.
◆ destroyChatroom:
- (EMError *_Nullable) destroyChatroom: |
|
(NSString *_Nonnull) |
aChatroomId |
|
|
required |
Dismisses a chatroom.
Only the owner of a chatroom has the privilege to dismiss it.
This is a synchronous method and blocks the current thread.
- Parameters
-
aChatroomId | The chatroom ID. |
- Returns
- -
nil
if the method call succeeds.
- Error information if the method call fails. See EMError.
◆ destroyChatroom:completion:
- (void) destroyChatroom: |
|
(NSString *_Nonnull) |
aChatroomId |
completion: |
|
(void(^)(EMError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
Dismisses a chatroom.
Only the owner of a chatroom has the privilege to dismiss it.
This is an asynchronous method.
- Parameters
-
aChatroomId | The chatroom ID. |
aCompletionBlock | The completion block, which contains the error message if the method call fails. |
◆ fetchChatroomAllAttributes:completion:
- (void) fetchChatroomAllAttributes: |
|
(NSString *_Nonnull) |
roomId |
completion: |
|
(void(^)(EMError *_Nullable error, NSDictionary< NSString *, NSString * > *_Nullable properties)) |
completionBlock |
|
|
| |
|
required |
Fetch the properties of chatroom form sever. This is an asynchronous method.
- Parameters
-
roomId | The chatroom ID. |
aCompletionBlock | The completion block, which contains keyValues and the error message if the method call fails. |
◆ fetchChatroomAttributes:keys:completion:
- (void) fetchChatroomAttributes: |
|
(NSString *_Nonnull) |
roomId |
keys: |
|
(NSArray< __kindof NSString * > *_Nullable) |
keys |
completion: |
|
(void(^)(EMError *_Nullable aError, NSDictionary< NSString *, NSString * > *_Nullable properties)) |
completionBlock |
|
|
| |
|
required |
Fetch the properties of chatroom form sever. This is an asynchronous method.
- Parameters
-
roomId | The chatroom ID. |
keys | Chat room attribute keys.Empty callback all. |
aCompletionBlock | The completion block, which contains keyValues and the error message if the method call fails. |
◆ getChatroomAnnouncementWithId:completion:
- (void) getChatroomAnnouncementWithId: |
|
(NSString *_Nonnull) |
aChatroomId |
completion: |
|
(void(^)(NSString *_Nullable aAnnouncement, EMError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
Gets the announcement of a chatroom from the server.
This is an asynchronous method.
- Parameters
-
aChatroomId | The chatroom ID. |
aCompletionBlock | The completion block, which contains the error message if the method call fails. |
◆ getChatroomAnnouncementWithId:error:
- (NSString *_Nullable) getChatroomAnnouncementWithId: |
|
(NSString *_Nonnull) |
aChatroomId |
error: |
|
(EMError **_Nullable) |
pError |
|
|
| |
|
required |
Gets the announcement of a chatroom from the server.
This is a synchronous method and blocks the current thread.
- Parameters
-
aChatroomId | The chatroom ID. |
pError | The error information if the method fails: Error. |
- Returns
- The announcement of chatroom.
◆ getChatroomBlacklistFromServerWithId:pageNumber:pageSize:completion:
- (void) getChatroomBlacklistFromServerWithId: |
|
(NSString *_Nonnull) |
aChatroomId |
pageNumber: |
|
(NSInteger) |
aPageNum |
pageSize: |
|
(NSInteger) |
aPageSize |
completion: |
|
(void(^)(NSArray< NSString * > *_Nullable aList, EMError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
Gets the chatroom's blocklist.
Only the chatroom owner or admin can call this method.
This is an asynchronous method.
- Parameters
-
aChatroomId | The chatroom ID. |
aPageNum | The page number. |
aPageSize | The page size. |
aCompletionBlock | The completion block, which contains the error message if the method call fails. |
◆ getChatroomBlacklistFromServerWithId:pageNumber:pageSize:error:
- (NSArray< NSString * > *_Nullable) getChatroomBlacklistFromServerWithId: |
|
(NSString *_Nonnull) |
aChatroomId |
pageNumber: |
|
(NSInteger) |
aPageNum |
pageSize: |
|
(NSInteger) |
aPageSize |
error: |
|
(EMError **_Nullable) |
pError |
|
|
| |
|
required |
Gets the blocklist of chatroom from the server.
Only the chatroom owner or admin can call this method.
This is a synchronous method and blocks the current thread.
- Parameters
-
aChatroomId | The chatroom ID. |
aPageNum | The page number. |
aPageSize | The page size. |
pError | The error information if the method fails: Error. |
◆ getChatroomMemberListFromServerWithId:cursor:pageSize:completion:
- (void) getChatroomMemberListFromServerWithId: |
|
(NSString *_Nonnull) |
aChatroomId |
cursor: |
|
(NSString *_Nullable) |
aCursor |
pageSize: |
|
(NSInteger) |
aPageSize |
completion: |
|
(void(^)(EMCursorResult< NSString * > *_Nullable aResult, EMError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
Gets the list of chatroom members from the server.
This is an asynchronous method.
- Parameters
-
aChatroomId | The chatroom ID. |
aCursor | The cursor. Set this parameter as nil when you call this method for the first time. |
aPageSize | The page size. |
aCompletionBlock | The completion block, which contains the error message if the method call fails. |
◆ getChatroomMemberListFromServerWithId:cursor:pageSize:error:
- (EMCursorResult< NSString * > *_Nullable) getChatroomMemberListFromServerWithId: |
|
(NSString *_Nonnull) |
aChatroomId |
cursor: |
|
(NSString *_Nullable) |
aCursor |
pageSize: |
|
(NSInteger) |
aPageSize |
error: |
|
(EMError **_Nullable) |
pError |
|
|
| |
|
required |
Gets the list of chatroom members from the server.
This is a synchronous method and blocks the current thread.
- Parameters
-
aChatroomId | The chatroom ID. |
aCursor | The cursor. Set this parameter as nil when you call this method for the first time. |
aPageSize | The page size. |
pError | The error information if the method fails: Error. |
- Returns
- The list of chatroom members and the cursor.
◆ getChatroomMuteListFromServerWithId:pageNumber:pageSize:completion:
- (void) getChatroomMuteListFromServerWithId: |
|
(NSString *_Nonnull) |
aChatroomId |
pageNumber: |
|
(NSInteger) |
aPageNum |
pageSize: |
|
(NSInteger) |
aPageSize |
completion: |
|
(void(^)(NSArray< NSString * > *_Nullable aList, EMError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
Gets the list of members who were muted in the chatroom from the server.
Only the chatroom owner or admin can call this method.
This is an asynchronous method.
- Parameters
-
aChatroomId | The chatroom ID. |
aPageNum | The page number. |
aPageSize | The page size. |
aCompletionBlock | The completion block, which contains the error message if the method call fails. |
◆ getChatroomMuteListFromServerWithId:pageNumber:pageSize:error:
- (NSArray< NSString * > *_Nullable) getChatroomMuteListFromServerWithId: |
|
(NSString *_Nonnull) |
aChatroomId |
pageNumber: |
|
(NSInteger) |
aPageNum |
pageSize: |
|
(NSInteger) |
aPageSize |
error: |
|
(EMError **_Nullable) |
pError |
|
|
| |
|
required |
Gets the list of members who are muted in the chatroom from the server.
Only the chatroom owner or admin can call this method.
This is a synchronous method and blocks the current thread.
- Parameters
-
aChatroomId | The chatroom ID. |
aPageNum | The page number. |
aPageSize | The page size. |
pError | The error information if the method fails: Error. |
◆ getChatroomsFromServerWithPage:pageSize:completion:
- (void) getChatroomsFromServerWithPage: |
|
(NSInteger) |
aPageNum |
pageSize: |
|
(NSInteger) |
aPageSize |
completion: |
|
(void(^)(EMPageResult< EMChatroom * > *_Nullable aResult, EMError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
Gets the specified number of chat rooms from the server.
This is an asynchronous method.
- Parameters
-
aPageNum | The page number. |
aPageSize | The page size. |
aCompletionBlock | The completion block, which contains the error message if the method call fails. |
◆ getChatroomsFromServerWithPage:pageSize:error:
- (EMPageResult< EMChatroom * > *_Nullable) getChatroomsFromServerWithPage: |
|
(NSInteger) |
aPageNum |
pageSize: |
|
(NSInteger) |
aPageSize |
error: |
|
(EMError **_Nullable) |
pError |
|
|
| |
|
required |
Gets the specified number of chat rooms from the server.
This is a synchronous method and blocks the current thread.
- Parameters
-
aPageNum | The page number. |
aPageSize | The page size. |
pError | The error information if the method fails: Error. |
- Returns
- The chat room list. See EMPageResult.
◆ getChatroomSpecificationFromServerWithId:completion:
- (void) getChatroomSpecificationFromServerWithId: |
|
(NSString *_Nonnull) |
aChatroomId |
completion: |
|
(void(^)(EMChatroom *_Nullable aChatroom, EMError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
Fetches the chat room specifications.
This is an asynchronous method.
- Parameters
-
aChatroomId | The chatroom ID. |
aCompletionBlock | The completion block, which contains the error message if the method call fails. |
◆ getChatroomSpecificationFromServerWithId:error:
- (EMChatroom *_Nullable) getChatroomSpecificationFromServerWithId: |
|
(NSString *_Nonnull) |
aChatroomId |
error: |
|
(EMError *_Nullable *) |
pError |
|
|
| |
|
required |
Fetches the specific chatroom.
This is a synchronous method and blocks the current thread.
- Parameters
-
aChatroomId | The chatroom ID. |
pError | The error information if the method fails: Error. |
- Returns
- The chatroom instance. See EMChatroom.
◆ getChatroomSpecificationFromServerWithId:fetchMembers:completion:
- (void) getChatroomSpecificationFromServerWithId: |
|
(NSString *_Nonnull) |
aChatroomId |
fetchMembers: |
|
(bool) |
aFetchMembers |
completion: |
|
(void(^)(EMChatroom *_Nullable aChatroom, EMError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
Fetches the chat room specifications.
This is an asynchronous method.
- Parameters
-
aChatroomId | The chatroom ID. |
aFetchMembers | Whether to get the member list. If you set the parameter as YES, it will return no more than 200 members. |
aCompletionBlock | The completion block, which contains the error message if the method call fails. |
◆ getChatroomWhiteListFromServerWithId:completion:
- (void) getChatroomWhiteListFromServerWithId: |
|
(NSString *_Nonnull) |
aChatroomId |
completion: |
|
(void(^)(NSArray< NSString * > *_Nullable aList, EMError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
Gets the allowlist of a chatroom from the server.
Only the chatroom owner or admin can call this method.
This is an asynchronous method.
- Parameters
-
aChatroomId | The chatroom ID. |
aCompletionBlock | The completion block, which contains the error message if the method call fails. |
◆ getChatroomWhiteListFromServerWithId:error:
- (NSArray< NSString * > *_Nullable) getChatroomWhiteListFromServerWithId: |
|
(NSString *_Nonnull) |
aChatroomId |
error: |
|
(EMError **_Nullable) |
pError |
|
|
| |
|
required |
Gets the allowlist of a chatroom from the server.
Only the chatroom owner or admin can call this method.
This is a synchronous method and blocks the current thread.
- Parameters
-
aChatroomId | The chatroom ID. |
pError | The error information if the method fails: Error. |
◆ isMemberInMuteListFromServerWithChatroomId:completion:
- (void) isMemberInMuteListFromServerWithChatroomId: |
|
(NSString *_Nonnull) |
aChatroomId |
completion: |
|
(void(^)(BOOL inMuteList, EMError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
Checks whether the current user is on the mute list.
This is an asynchronous method.
- Parameters
-
aChatroomId | The chatroom ID. |
aCompletionBlock | The completion block, which contains the error message if the method call fails. |
◆ isMemberInWhiteListFromServerWithChatroomId:completion:
- (void) isMemberInWhiteListFromServerWithChatroomId: |
|
(NSString *_Nonnull) |
aChatroomId |
completion: |
|
(void(^)(BOOL inWhiteList, EMError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
Checks whether the current user is on the allowlist.
This is an asynchronous method.
- Parameters
-
aChatroomId | The chatroom ID. |
aCompletionBlock | The completion block, which contains the error message if the method call fails. |
◆ isMemberInWhiteListFromServerWithChatroomId:error:
- (BOOL) isMemberInWhiteListFromServerWithChatroomId: |
|
(NSString *_Nonnull) |
aChatroomId |
error: |
|
(EMError **_Nullable) |
pError |
|
|
| |
|
required |
Checks whether the current user is on the allowlist.
This is a synchronous method and blocks the current thread.
- Parameters
-
aChatroomId | The chatroom ID. |
pError | The error information if the method fails: Error. |
◆ joinChatroom:completion:
- (void) joinChatroom: |
|
(NSString *_Nonnull) |
aChatroomId |
completion: |
|
(void(^)(EMChatroom *_Nullable aChatroom, EMError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
Joins a chatroom.
This is an asynchronous method.
- Parameters
-
aChatroomId | The chatroom ID. |
aCompletionBlock | The completion block, which contains the error message if the method call fails. |
◆ joinChatroom:error:
- (EMChatroom *) joinChatroom: |
|
(NSString *_Nonnull) |
aChatroomId |
error: |
|
(EMError **_Nullable) |
pError |
|
|
| |
|
required |
Joins a chatroom.
This is a synchronous method and blocks the current thread.
- Parameters
-
aChatroomId | The chatroom ID. |
pError | The error information if the method fails: Error. |
- Returns
- The chatroom instance.
◆ joinChatroom:ext:leaveOtherRooms:completion:
- (void) joinChatroom: |
|
(NSString *_Nonnull) |
aChatroomId |
ext: |
|
(NSString *_Nullable) |
ext |
leaveOtherRooms: |
|
(BOOL) |
leaveOtherRooms |
completion: |
|
(void(^)(EMChatroom *_Nullable aChatroom, EMError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
Joins the chat room.
This is an asynchronous method.
- Parameters
-
aChatroomId | The chat room ID. |
ext | The extension information. |
leaveOtherRooms | Whether to leave all the currently joined chat rooms when joining a chat room.
YES :Yes. The user joins the chat room, while leaving all other chat rooms.
- (Default)
NO : No. The user joins the chat room, without leaving all other chat rooms.
|
aCompletionBlock | The completion block, which contains the error message if the method fails. |
◆ leaveChatroom:completion:
- (void) leaveChatroom: |
|
(NSString *_Nonnull) |
aChatroomId |
completion: |
|
(void(^)(EMError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
Leaves a chatroom.
This is an asynchronous method.
- Parameters
-
aChatroomId | The chatroom ID. |
aCompletionBlock | The completion block, which contains the error message if the method call fails. |
◆ leaveChatroom:error:
- (void) leaveChatroom: |
|
(NSString *_Nonnull) |
aChatroomId |
error: |
|
(EMError **_Nullable) |
pError |
|
|
| |
|
required |
Leaves a chatroom.
This is a synchronous method and blocks the current thread.
- Parameters
-
aChatroomId | The chatroom ID. |
pError | The error information if the method fails: Error. |
◆ muteAllMembersFromChatroom:completion:
- (void) muteAllMembersFromChatroom: |
|
(NSString *_Nonnull) |
aChatroomId |
completion: |
|
(void(^)(EMChatroom *_Nullable aChatroom, EMError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
Mutes all members.
Only the chatroom owner or admin can call this method.
This is an asynchronous method.
- Parameters
-
aChatroomId | The chatroom ID. |
aCompletionBlock | The completion block, which contains the error message if the method call fails. |
◆ muteAllMembersFromChatroom:error:
- (EMChatroom *_Nullable) muteAllMembersFromChatroom: |
|
(NSString *_Nonnull) |
aChatroomId |
error: |
|
(EMError **_Nullable) |
pError |
|
|
| |
|
required |
Mutes all members.
Only the chatroom owner or admin can call this method.
This is a synchronous method and blocks the current thread.
- Parameters
-
aChatroomId | The chatroom ID. |
pError | The error information if the method fails: Error. |
- Returns
- The chatroom instance. See EMChatroom.
◆ muteMembers:muteMilliseconds:fromChatroom:completion:
- (void) muteMembers: |
|
(NSArray< NSString * > *_Nonnull) |
aMuteMembers |
muteMilliseconds: |
|
(NSInteger) |
aMuteMilliseconds |
fromChatroom: |
|
(NSString *_Nonnull) |
aChatroomId |
completion: |
|
(void(^)(EMChatroom *_Nullable aChatroom, EMError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
Mutes chatroom members.
Only the chatroom owner or admin can call this method.
This is an asynchronous method.
- Parameters
-
aMuteMembers | The list of mute. |
aMuteMilliseconds | Muted time duration in millisecond |
aChatroomId | The chatroom ID. |
aCompletionBlock | The completion block, which contains the error message if the method call fails. |
◆ muteMembers:muteMilliseconds:fromChatroom:error:
- (EMChatroom *_Nullable) muteMembers: |
|
(NSArray< NSString * > *_Nonnull) |
aMuteMembers |
muteMilliseconds: |
|
(NSInteger) |
aMuteMilliseconds |
fromChatroom: |
|
(NSString *_Nonnull) |
aChatroomId |
error: |
|
(EMError **_Nullable) |
pError |
|
|
| |
|
required |
Mutes chatroom members.
Only the chatroom owner or admin can call this method.
This is a synchronous method and blocks the current thread.
- Parameters
-
aMuteMembers | The list of members to mute. |
aMuteMilliseconds | Muted time duration in millisecond. |
aChatroomId | The chatroom ID. |
pError | The error information if the method fails: Error. |
- Returns
- The chatroom instance. See EMChatroom.
◆ removeAdmin:fromChatroom:completion:
- (void) removeAdmin: |
|
(NSString *_Nonnull) |
aAdmin |
fromChatroom: |
|
(NSString *_Nonnull) |
aChatroomId |
completion: |
|
(void(^)(EMChatroom *_Nullable aChatroom, EMError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
Removes a chatroom admin.
Only the chatroom owner and admin can call this method.
This is an asynchronous method.
- Parameters
-
aAdmin | The admin to be removed. |
aChatroomId | The chatroom ID. |
aCompletionBlock | The completion block, which contains the error message if the method call fails. |
◆ removeAdmin:fromChatroom:error:
- (EMChatroom *_Nullable) removeAdmin: |
|
(NSString *_Nonnull) |
aAdmin |
fromChatroom: |
|
(NSString *_Nonnull) |
aChatroomId |
error: |
|
(EMError **_Nullable) |
pError |
|
|
| |
|
required |
Removes a chatroom admin.
Only the chatroom owner can call this method.
This is a synchronous method and blocks the current thread.
- Parameters
-
aAdmin | The admin to be removed. |
aChatroomId | The chatroom ID. |
pError | The error information if the method fails: Error. |
- Returns
- The chatroom instance. See EMChatroom.
◆ removeChatroomAttribute:key:completionBlock:
- (void) removeChatroomAttribute: |
|
(NSString *_Nonnull) |
roomId |
key: |
|
(NSString *_Nonnull) |
key |
completionBlock: |
|
(void(^)(EMError *_Nullable aError)) |
completionBlock |
|
|
| |
|
required |
Removes a custom chat room attribute.
- Note
- This method does not remove attributes set by other members.
This is an asynchronous method.
- Parameters
-
aChatroomId | The chat room ID. |
key | The key of the chat room attribute to remove. |
aCompletionBlock | The completion block, which contains the error message if the method call fails. If certain attribute keys fail to be added, the SDK returns failureKeys map in key-value format, where the key is the attribute key, and the value is the reason for the failure. |
◆ removeChatroomAttributeForced:key:completionBlock:
- (void) removeChatroomAttributeForced: |
|
(NSString *_Nonnull) |
roomId |
key: |
|
(NSString *_Nonnull) |
key |
completionBlock: |
|
(void(^)(EMError *_Nullable aError)) |
completionBlock |
|
|
| |
|
required |
Removes custom chat room attributes forcibly.
- Note
- This method removes attributes set by other members.
This is an asynchronous method.
- Parameters
-
aChatroomId | The chat room ID. |
key | The keys of the custom chat room attributes to remove. |
aCompletionBlock | The completion block, which contains the error message if the method call fails. If certain attribute keys fail to be added, the SDK returns failureKeys map in key-value format, where the key is the attribute key and the value is the reason for the failure. |
◆ removeChatroomAttributes:attributes:completionBlock:
- (void) removeChatroomAttributes: |
|
(NSString *_Nonnull) |
roomId |
attributes: |
|
(NSArray< __kindof NSString * > *_Nonnull) |
keyValues |
completionBlock: |
|
(void(^)(EMError *_Nullable aError, NSDictionary< NSString *, EMError * > *_Nullable failureKeys)) |
completionBlock |
|
|
| |
|
required |
Removes custom chat room attributes.
- Note
- This method does not remove attributes set by other members.
This is an asynchronous method.
- Parameters
-
aChatroomId | The chat room ID. |
attributes | The keys of the chat room attributes to remove. |
aCompletionBlock | The completion block, which contains the error message if the method call fails. If certain attribute keys fail to be added, the SDK returns failureKeys map in key-value format, where the key is the attribute key, and the value is the reason for the failure. |
◆ removeChatroomAttributesForced:attributes:completionBlock:
- (void) removeChatroomAttributesForced: |
|
(NSString *_Nonnull) |
roomId |
attributes: |
|
(NSArray< __kindof NSString * > *_Nonnull) |
keyValues |
completionBlock: |
|
(void(^)(EMError *_Nullable aError, NSDictionary< NSString *, EMError * > *_Nullable failureKeys)) |
completionBlock |
|
|
| |
|
required |
Removes custom chat room attributes forcibly.
- Note
- This method removes attributes set by other members.
This is an asynchronous method.
- Parameters
-
aChatroomId | The chat room ID. |
keyValues | The array of chat room attribute keys. |
aCompletionBlock | The completion block, which contains the error message if the method call fails. |
◆ removeDelegate:
Removes the delegate.
- Parameters
-
aDelegate | The delegate that you want to remove. |
◆ removeMembers:fromChatroom:completion:
- (void) removeMembers: |
|
(NSArray< NSString * > *_Nonnull) |
aMembers |
fromChatroom: |
|
(NSString *_Nonnull) |
aChatroomId |
completion: |
|
(void(^)(EMChatroom *_Nullable aChatroom, EMError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
Removes members from a chatroom.
Only the chatroom owner or admin can call this method.
This is an asynchronous method.
- Parameters
-
aMembers | The users to be removed from the chatroom. |
aChatroomId | The chatroom ID. |
aCompletionBlock | The completion block, which contains the error message if the method call fails. |
◆ removeMembers:fromChatroom:error:
- (EMChatroom *_Nullable) removeMembers: |
|
(NSArray< NSString * > *_Nonnull) |
aMembers |
fromChatroom: |
|
(NSString *_Nonnull) |
aChatroomId |
error: |
|
(EMError **_Nullable) |
pError |
|
|
| |
|
required |
Removes members from a chatroom.
Only the chatroom owner or admin can call this method.
This is a synchronous method and blocks the current thread.
- Parameters
-
aMembers | The users to be removed from the chatroom. |
aChatroomId | The chatroom ID. |
pError | The error information if the method fails: Error. |
- Returns
- The chatroom instance.
◆ removeWhiteListMembers:fromChatroom:completion:
- (void) removeWhiteListMembers: |
|
(NSArray< NSString * > *_Nonnull) |
aMembers |
fromChatroom: |
|
(NSString *_Nonnull) |
aChatroomId |
completion: |
|
(void(^)(EMChatroom *_Nullable aChatroom, EMError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
Removes members from the allowlist.
Only the chatroom owner or admin can call this method.
This is an asynchronous method.
- Parameters
-
aMembers | The members to be removed from the allowlist. |
aChatroomId | The chatroom ID. |
aCompletionBlock | The completion block, which contains the error message if the method call fails. |
◆ removeWhiteListMembers:fromChatroom:error:
- (EMChatroom *_Nullable) removeWhiteListMembers: |
|
(NSArray< NSString * > *_Nonnull) |
aMembers |
fromChatroom: |
|
(NSString *_Nonnull) |
aChatroomId |
error: |
|
(EMError **_Nullable) |
pError |
|
|
| |
|
required |
Removes the members of the allowlist.
Only the chatroom owner or admin can call this method.
This is a synchronous method and blocks the current thread.
- Parameters
-
aMembers | The members to be removed from the allowlist. |
aChatroomId | The chatroom ID. |
pError | The error information if the method fails: Error. |
- Returns
- The chatroom instance. See EMChatroom.
◆ setChatroomAttribute:key:value:autoDelete:completionBlock:
- (void) setChatroomAttribute: |
|
(NSString *_Nonnull) |
roomId |
key: |
|
(NSString *_Nonnull) |
key |
value: |
|
(NSString *_Nonnull) |
value |
autoDelete: |
|
(BOOL) |
autoDelete |
completionBlock: |
|
(void(^)(EMError *_Nullable aError)) |
completionBlock |
|
|
| |
|
required |
Sets a custom chat room attribute.
- Note
- This method does not overwrite attributes set by others.
This is an asynchronous method.
- Parameters
-
roomId | The chat room ID. |
key | The chat room attribute key that specifies the attribute name. The attribute name can contain 128 characters at most. A chat room can have a maximum of 100 custom attributes. The following character sets are supported:
- 26 lowercase English letters (a-z)
- 26 uppercase English letters (A-Z)
- 10 numbers (0-9)
- "_", "-", "."
|
value | The chat room attribute value. The attribute value can contain a maximum of 4096 characters. The total length of custom chat room attributes cannot exceed 10 GB for each app. |
autoDelete | Whether to delete the custom chat room attributes set by the member when he or she exits the chat room.
- (Default)
YES : Yes;
NO : No.
|
aCompletionBlock | The completion block, which contains the error message if the method call fails. If certain attribute keys fail to be added, the SDK returns failureKeys map in key-value format, where the key is the attribute key, and the value is the reason for the failure. |
◆ setChatroomAttributeForced:key:value:autoDelete:completionBlock:
- (void) setChatroomAttributeForced: |
|
(NSString *_Nonnull) |
roomId |
key: |
|
(NSString *_Nonnull) |
key |
value: |
|
(NSString *_Nonnull) |
value |
autoDelete: |
|
(BOOL) |
autoDelete |
completionBlock: |
|
(void(^)(EMError *_Nullable aError)) |
completionBlock |
|
|
| |
|
required |
Sets a custom chat room attribute forcibly.
- Note
- This method overwrites attributes set by others.
This is an asynchronous method.
- Parameters
-
roomId | The chat room ID. |
key | The chat room attribute key that specifies the attribute name. The attribute name can contain 128 characters at most. A chat room can have a maximum of 100 custom attributes. The following character sets are supported:
- 26 lowercase English letters (a-z)
- 26 uppercase English letters (A-Z)
- 10 numbers (0-9)
- "_", "-", "."
|
value | The attribute value to set. A single Value can not exceed 4096 characters. The total attribute can not exceed 10 GB. |
autoDelete | Whether to delete the chat room attributes set by the member when he or she exits the chat room.
- (Default)
YES : Yes;
NO : No.
|
aCompletionBlock | The completion block, which contains the error message if the method call fails. If certain attribute keys fail to be added, the SDK returns failureKeys map in key-value format, where the key is the attribute key, and the value is the reason for the failure. |
◆ setChatroomAttributes:attributes:autoDelete:completionBlock:
- (void) setChatroomAttributes: |
|
(NSString *_Nonnull) |
roomId |
attributes: |
|
(NSDictionary< NSString *, NSString * > *_Nonnull) |
keyValues |
autoDelete: |
|
(BOOL) |
autoDelete |
completionBlock: |
|
(void(^)(EMError *_Nullable aError, NSDictionary< NSString *, EMError * > *_Nullable failureKeys)) |
completionBlock |
|
|
| |
|
required |
Sets custom attributes of the chat room.
- Note
- This method does not overwrite attributes set by others.
This is an asynchronous method.
- Parameters
-
roomId | The chat room ID. |
attributes | The custom chat room attributes in key-value pairs, where the key is the attribute name and the value is the attribute value. |
autoDelete | Whether to delete the chat room attributes set by the member when he or she exits the chat room.
- (Default)
YES : Yes;
NO : No.
|
aCompletionBlock | The completion block, which contains the error message if the method call fails. If certain attribute keys fail to be added, the SDK returns failureKeys map in key-value format, where the key is the attribute key, and the value is the reason for the failure. |
◆ setChatroomAttributesForced:attributes:autoDelete:completionBlock:
- (void) setChatroomAttributesForced: |
|
(NSString *_Nonnull) |
roomId |
attributes: |
|
(NSDictionary< NSString *, NSString * > *_Nonnull) |
keyValues |
autoDelete: |
|
(BOOL) |
autoDelete |
completionBlock: |
|
(void(^)(EMError *_Nullable aError, NSDictionary< NSString *, EMError * > *_Nullable failureKeys)) |
completionBlock |
|
|
| |
|
required |
Sets custom chat room attributes forcibly.
- Note
- This method overwrites attributes set by others.
This is an asynchronous method.
- Parameters
-
roomId | The chat room ID. |
attributes | The custom chat room attributes in key-value pairs, where the key is the attribute name and the value is the attribute value. |
aCompletionBlock | The completion block, which contains the error message if the method call fails. If certain attribute keys fail to be added, the SDK returns failureKeys map in key-value format, where the key is the attribute key, and the value is the reason for the failure. |
◆ unblockMembers:fromChatroom:completion:
- (void) unblockMembers: |
|
(NSArray< NSString * > *_Nonnull) |
aMembers |
fromChatroom: |
|
(NSString *_Nonnull) |
aChatroomId |
completion: |
|
(void(^)(EMChatroom *_Nullable aChatroom, EMError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
Removes users from the chatroom blocklist.
Only the chatroom owner can call this method.
This is an asynchronous method.
- Parameters
-
aMembers | The users to be removed from the blocklist. |
aChatroomId | The chatroom ID. |
aCompletionBlock | The completion block, which contains the error message if the method call fails. |
◆ unblockMembers:fromChatroom:error:
- (EMChatroom *_Nullable) unblockMembers: |
|
(NSArray< NSString * > *_Nonnull) |
aMembers |
fromChatroom: |
|
(NSString *_Nonnull) |
aChatroomId |
error: |
|
(EMError **_Nullable) |
pError |
|
|
| |
|
required |
Removes users from chatroom blocklist.
Only the chatroom owner can call this method.
This is a synchronous method and blocks the current thread.
- Parameters
-
aMembers | The users to be removed from the blocklist. |
aChatroomId | The chatroom ID. |
pError | The error information if the method fails: Error. |
- Returns
- The chatroom instance.
◆ unmuteAllMembersFromChatroom:completion:
- (void) unmuteAllMembersFromChatroom: |
|
(NSString *_Nonnull) |
aChatroomId |
completion: |
|
(void(^)(EMChatroom *_Nullable aChatroom, EMError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
Unmute all members.
Only the chatroom owner or admin can call this method.
This is an asynchronous method.
- Parameters
-
aChatroomId | The chatroom ID. |
aCompletionBlock | The completion block, which contains the error message if the method call fails. |
◆ unmuteAllMembersFromChatroom:error:
- (EMChatroom *_Nullable) unmuteAllMembersFromChatroom: |
|
(NSString *_Nonnull) |
aChatroomId |
error: |
|
(EMError **_Nullable) |
pError |
|
|
| |
|
required |
Unmute all members.
Only the chatroom owner or admin can call this method.
This is a synchronous method and blocks the current thread.
- Parameters
-
aChatroomId | The chatroom ID. |
pError | The error information if the method fails: Error. |
- Returns
- The chatroom instance. See EMChatroom.
◆ unmuteMembers:fromChatroom:completion:
- (void) unmuteMembers: |
|
(NSArray< NSString * > *_Nonnull) |
aMembers |
fromChatroom: |
|
(NSString *_Nonnull) |
aChatroomId |
completion: |
|
(void(^)(EMChatroom *_Nullable aChatroom, EMError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
Unmutes chatroom members.
Only the chatroom owner or admin can call this method.
This is an asynchronous method.
- Parameters
-
aMembers | The list of unmute. |
aChatroomId | The chatroom ID. |
aCompletionBlock | The completion block, which contains the error message if the method call fails. |
◆ unmuteMembers:fromChatroom:error:
- (EMChatroom *_Nullable) unmuteMembers: |
|
(NSArray< NSString * > *_Nonnull) |
aMembers |
fromChatroom: |
|
(NSString *_Nonnull) |
aChatroomId |
error: |
|
(EMError **_Nullable) |
pError |
|
|
| |
|
required |
Unmutes chatroom members.
Only the chatroom owner or admin can call this method.
This is a synchronous method and blocks the current thread.
- Parameters
-
aMembers | The list of members to unmute. |
aChatroomId | The chatroom ID. |
pError | The error information if the method fails: Error. |
- Returns
- The chatroom instance. See EMChatroom.
◆ updateChatroomAnnouncementWithId:announcement:completion:
- (void) updateChatroomAnnouncementWithId: |
|
(NSString *_Nonnull) |
aChatroomId |
announcement: |
|
(NSString *_Nullable) |
aAnnouncement |
completion: |
|
(void(^)(EMChatroom *_Nullable aChatroom, EMError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
Changes the announcement of chatroom.
Only the chatroom owner or admin can call this method.
This is an asynchronous method.
- Parameters
-
aChatroomId | The chatroom ID. |
aAnnouncement | The announcement of the chatroom. |
aCompletionBlock | The completion block, which contains the error message if the method call fails. |
◆ updateChatroomAnnouncementWithId:announcement:error:
- (EMChatroom *_Nullable) updateChatroomAnnouncementWithId: |
|
(NSString *_Nonnull) |
aChatroomId |
announcement: |
|
(NSString *_Nullable) |
aAnnouncement |
error: |
|
(EMError **_Nullable) |
pError |
|
|
| |
|
required |
Changes the announcement of the chatroom.
Only the chatroom owner or admin can call this method.
This is a synchronous method and blocks the current thread.
- Parameters
-
aChatroomId | The chatroom ID. |
aAnnouncement | The announcement of the chatroom. |
pError | The error information if the method fails: Error. |
- Returns
- The chatroom instance. See EMChatroom.
◆ updateChatroomOwner:newOwner:completion:
- (void) updateChatroomOwner: |
|
(NSString *_Nonnull) |
aChatroomId |
newOwner: |
|
(NSString *_Nonnull) |
aNewOwner |
completion: |
|
(void(^)(EMChatroom *_Nullable aChatroom, EMError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
Changes the chatroom owner.
Only the chatroom owner can call this method.
This is an asynchronous method.
- Parameters
-
aChatroomId | The chatroom ID. |
aNewOwner | The new owner. |
aCompletionBlock | The completion block, which contains the error message if the method call fails. |
◆ updateChatroomOwner:newOwner:error:
- (EMChatroom *_Nullable) updateChatroomOwner: |
|
(NSString *_Nonnull) |
aChatroomId |
newOwner: |
|
(NSString *_Nonnull) |
aNewOwner |
error: |
|
(EMError **_Nullable) |
pError |
|
|
| |
|
required |
Changes the chatroom owner.
Only the chatroom owner can call this method.
This is a synchronous method and blocks the current thread.
- Parameters
-
aChatroomId | The chatroom ID. |
aNewOwner | The new owner. |
pError | The error information if the method fails: Error. |
- Returns
- The chatroom instance. See EMChatroom.
◆ updateDescription:forChatroom:completion:
- (void) updateDescription: |
|
(NSString *_Nullable) |
aDescription |
forChatroom: |
|
(NSString *_Nonnull) |
aChatroomId |
completion: |
|
(void(^)(EMChatroom *_Nullable aChatroom, EMError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
Changes the chatroom's description.
Only the chatroom owner can call this method.
This is an asynchronous method.
- Parameters
-
aDescription | The new description. |
aChatroomId | The chatroom ID. |
aCompletionBlock | The completion block, which contains the error message if the method call fails. |
◆ updateDescription:forChatroom:error:
- (EMChatroom *_Nullable) updateDescription: |
|
(NSString *_Nullable) |
aDescription |
forChatroom: |
|
(NSString *_Nonnull) |
aChatroomId |
error: |
|
(EMError **_Nullable) |
pError |
|
|
| |
|
required |
Changes chatroom description.
Only the chatroom owner can call this method.
This is a synchronous method and blocks the current thread.
- Parameters
-
aDescription | The new description. |
aChatroomId | The chatroom ID. |
pError | The error information if the method fails: Error. |
- Returns
- The chatroom instance.
◆ updateSubject:forChatroom:completion:
- (void) updateSubject: |
|
(NSString *_Nullable) |
aSubject |
forChatroom: |
|
(NSString *_Nonnull) |
aChatroomId |
completion: |
|
(void(^)(EMChatroom *_Nullable aChatroom, EMError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
Changes the chatroom subject.
Only the chatroom owner can call this method.
This is an asynchronous method.
- Parameters
-
aSubject | The new subject of the chatroom. |
aChatroomId | The chatroom ID. |
aCompletionBlock | The completion block, which contains the error message if the method call fails. |
◆ updateSubject:forChatroom:error:
- (EMChatroom *) updateSubject: |
|
(NSString *_Nullable) |
aSubject |
forChatroom: |
|
(NSString *_Nonnull) |
aChatroomId |
error: |
|
(EMError **_Nullable) |
pError |
|
|
| |
|
required |
Changes the chatroom‘s subject.
Only the chatroom owner can call this method.
This is a synchronous method and blocks the current thread.
- Parameters
-
aSubject | The new subject of the chatroom. |
aChatroomId | The chatroom ID. |
pError | The error information if the method fails: Error. |
- Returns
- The chatroom instance.
The documentation for this protocol was generated from the following file: