SuperTeam
Update time: 2024/03/14 17:08:34
Overview
The NIMSuperTeamManager
class is used to manage supergroups. Supergroups can accommodate a large number of group members. Up to 10,000 members can join a supergroup. However, not all features supported by advanced group are available for supergroups. Roles in a supergroup include the owner and regular members.
Create a supergroup
Only the server API can create a supergroup. The SDK provides no methods to create supergroups.
Get supergroups
The NIM SDK will synchronize the local group information when the app starts. You can call the corresponding interface to get the group information from the local cache. NIM SDK provides interfaces to retrieve data of multiple groups a user has joined or a single group by group ID. The SDK also provides an interface for obtaining group information from the server.
Get all groups from the local database
Prototype
objc@protocol NIMSuperTeamManager <NSObject>
/**
* Get all groups
*
* @return list of all groups
*/
- (nullable NSArray<NIMTeam *> *)allMyTeams;
@end
Get the specified groups from the local database
objc@protocol NIMSuperTeamManager <NSObject>
/**
* Get specific group information based on the group ID
*
* @param teamId Group ID
*
* @return Group info
*/
- (nullable NIMTeam *)teamById:(NSString *)teamId;
@end
Properties
Parameter | Type | Description |
---|---|---|
teamId | NSString | The group ID. |
Get specified groups from the cloud
objc@protocol NIMSuperTeamManager <NSObject>
/**
* Get the group profile
*
* @param teamId Group ID
* @param completion Completion callback
*/
- (void)fetchTeamInfo:(NSString *)teamId
completion:(nullable NIMTeamFetchInfoHandler)completion
@end
Dismiss supergroups
Only the server API can dismiss a supergroup. The SDK provides no methods to dismiss supergroups.
Group member management
Join a group
Request to join a group
objc@protocol NIMSuperTeamManager <NSObject>
/**
* Request to join a group
*
* @param teamId Group ID
* @param message request message
* @param completion Completion callback
*/
- (void)applyToTeam:(NSString *)teamId
message:(NSString *)message
completion:(nullable NIMTeamApplyHandler)completion;
@end
Properties
Parameter | Type | Description |
---|---|---|
teamId | NSString | The group ID. |
message | NSString | request message |
completion | NIMTeamApplyHandler | Callback for completion |
Verify join requests
Approve a join request
objc@protocol NIMSuperTeamManager <NSObject>
/**
* Approve the request to join a group
*
* @param teamId Group ID
* @param userId ID of a requester
* @param completion Completion callback
*/
- (void)passApplyToTeam:(NSString *)teamId
userId:(NSString *)userId
completion:(nullable NIMTeamApplyHandler)completion;
@end
Properties
Parameter | Type | Description |
---|---|---|
teamId | NSString | The group ID. |
userId | NSString | The ID of a user that send the request |
completion | NIMTeamApplyHandler | Callback for completion |
Reject a join request
objc@protocol NIMSuperTeamManager <NSObject>
/**
* Decline a request to join a group
*
* @param teamId Group ID
* @param userId ID of a requester
* @param rejectReason reason for rejecting the request
* @param completion Completion callback
*/
- (void)rejectApplyToTeam:(NSString *)teamId
userId:(NSString *)userId
rejectReason:(NSString*)rejectReason
completion:(nullable NIMTeamHandler)completion;
@end
Properties
Parameter | Type | Description |
---|---|---|
teamId | NSString | The group ID. |
userId | NSString | The ID of a user that send the request |
rejectReason | NSString | The reason for rejecting a request |
completion | NIMTeamHandler | Callback for completion. |
Invite to join a group
objc@protocol NIMSuperTeamManager <NSObject>
/**
* Send an invite request
*
* @param users user ID list
* @param teamId Group ID
* @param postscript additional message for invitation
* @param attach extended message
* @param completion Completion callback
*/
- (void)addUsers:(NSArray<NSString *> *)users
toTeam:(NSString *)teamId
postscript:(nullable NSString *)postscript
attach:(nullable NSString *)attach
completion:(nullable NIMTeamMemberHandler)completion;
@end
Properties
Parameter | Type | Description |
---|---|---|
users | NSArray<NSString *> | The list of user IDs. |
teamId | NSString | The group ID. |
postscript | NSString | The additional message for an invitation. |
attach | NSString | Extended message |
completion | NIMTeamMemberHandler | Callback for completion. |
Respond to invitations
Accept an invitation
objc@protocol NIMSuperTeamManager <NSObject>
/**
* Accept an invitation to join a group
*
* @param teamId Group ID
* @param invitorId invitor ID
* @param completion Completion callback
*/
- (void)acceptInviteWithTeam:(NSString*)teamId
invitorId:(NSString*)invitorId
completion:(nullable NIMTeamHandler)completion;
@end
Properties
Parameter | Type | Description |
---|---|---|
teamId | NSString | The group ID. |
invitorId | NSString | The ID of a user that sends an invitation. |
completion | NIMTeamHandler | Callback for completion. |
Reject an invitation
objc@protocol NIMSuperTeamManager <NSObject>
/**
* Reject an invite request
*
* @param teamId Group ID
* @param invitorId invitor ID
* @param rejectReason reason for rejecting the request
* @param completion Completion callback
*/
- (void)rejectInviteWithTeam:(NSString*)teamId
invitorId:(NSString*)invitorId
rejectReason:(NSString*)rejectReason
completion:(nullable NIMTeamHandler)completion;
@end
Properties
Parameter | Type | Description |
---|---|---|
teamId | NSString | The group ID. |
invitorId | NSString | The ID of a user that sends an invitation. |
rejectReason | NSString | The reason for rejecting an invitation |
completion | NIMTeamHandler | Callback for completion. |
Remove members
objc@protocol NIMSuperTeamManager <NSObject>
/**
* Remove members from a group
*
* @param users list of user IDs to be removed
* @param teamId Group ID
* @param completion Completion callback
*/
- (void)kickUsers:(NSArray<NSString *> *)users
fromTeam:(NSString *)teamId
completion:(NIMSuperTeamHandler)completion
@end
- After a user is removed a group, the relevant session information will still be retained, but the messages from this group will no longer be received.
Properties
Parameter | Type | Description |
---|---|---|
users | NSArray<NSString *> | The IDs of users to be removed. |
teamId | NSString | The group ID. |
completion | NIMSuperTeamHandler | Callback for completion. |
Leave a group
Leave a group
objc@protocol NIMSuperTeamManager <NSObject>
/**
* Leave a group
*
* @param teamId Group ID
* @param completion Completion callback
*/
- (void)quitTeam:(NSString *)teamId
completion:(NIMSuperTeamHandler)completion
@end
Properties
Parameter | Type | Description |
---|---|---|
teamId | NSString | The group ID. |
completion | NIMSuperTeamHandler | Callback for completion. |
- After a user successfully leaves a group, the relevant session information will still be retained, but the messages from this group will no longer be received.
Get the members of a group
Group member information is different from user information. The information is associated with groups. The group member information of the same user in different groups is also different. Group member information includes group nickname, join time, member type and the like.
Prototype
objc@interface NIMSuperTeamMember : NSObject
/**
* Group ID
*/
@property (nullable,nonatomic,copy,readonly) NSString *teamId;
/**
* User ID
*/
@property (nullable,nonatomic,copy,readonly) NSString *userId;
/**
* Inviter ID
* @dicusssion This field is valid only when the member is the current user You cannot view the inviters of other group members
*/
@property (nullable,nonatomic,copy,readonly) NSString *invitor;
/**
* Group nickname
*/
@property (nullable,nonatomic,copy) NSString *nickname;
/**
* Time a user joined a group
*/
@property (nonatomic,assign,readonly) NSTimeInterval createTime;
/**
* Custom field of a new group member
*/
@property (nullable,nonatomic,copy) NSString *customInfo;
@end
Properties
Parameter | Type | Description |
---|---|---|
teamId | NSString | The group ID. |
userId | NSString | Group member ID |
nickname | NSString | Group nickname |
isMuted | BOOL | Whether a member is muted. |
createTime | NSTimeInterval | The time when a member joined a group. |
customInfo | NSString | Custom information about a new group member. |
For group members, the SDK does not guarantee local data, and the SDK will synchronize the group members in the group after login. For the data of group members that have been synced or retrieved from the server, the SDK will cache the data on the local storage.
When the member information in the local cache changes, the upper layer will be notified by the NIMSuperTeamManagerDelegate
callback.
Get the members of a group
objc@protocol NIMSuperTeamManager <NSObject>
/**
* Get the members of a group
*
* @param teamId Group ID
* @param option pagination option
* @param completion completion callback
*/
- (void)fetchTeamMembers:(NSString *)teamId
option:(NIMTeamFetchMemberOption *)option
completion:(nullable NIMSuperTeamMemberHandler)completion;
@end
Properties
Parameter | Type | Description |
---|---|---|
teamId | NSString | The group ID. |
option | NIMTeamFetchMemberOption | Option for pagination |
completion | NIMSuperTeamMemberHandler | Callback for completion |
In most cases, this request fetches the data interval from the local cache and sync the data with the server. However, due to the large amount of information about group members, the SDK delays retrieving the information after in the login. Considering the network and other issues, the SDK may not cache the group member information in time, so this request will be an asynchronous operation (incremental request) with a network request. * At the same time, this interface will request the data information of group users that are not cached locally, but will not trigger - (void)onUserInfoChanged: callback.
The obtained data of group members only have group-related data stored on the CommsEase server. You must combine the user data managed by the app server for display.
Get the specified group member
objc@protocol NIMSuperTeamManager <NSObject>
/**
* Get the member information. Returns the locally cached group member information, or return nil if no corresponding data is stored on the local storage.
*
* @param userId User ID
* @param teamId Group ID
*/
- (nullable NIMTeamMember *)teamMember:(NSString *)userId
inTeam:(NSString *)teamId;
@end
Edit the profile of a group member
objc@protocol NIMSuperTeamManager <NSObject>
/**
* Update the nickname in a group
*
* @param userId group member ID
* @param teamId Group ID
* @param completion Completion callback
*/
- (void)updateMyNick:(NSString *)userId
inTeam:(NSString *)teamId
completion:(NIMSuperTeamHandler)completion
@end
Properties
Parameter | Type | Description |
---|---|---|
userId | NSString | user ID |
teamId | NSString | The group ID. |
completion | NIMSuperTeamHandler | Callback for completion. |
- Update the nickname of the current user
objc@protocol NIMSuperTeamManager <NSObject>
* Update the nickname of the current user
*
* @param userId Member ID
* @param newNick New nickname
* @param teamId Group ID
* @param completion Completion callback
*/
- (void)updateUserNick:(NSString *)userId
newNick:(NSString *)newNick
inTeam:(NSString *)teamId
completion:(nullable NIMTeamHandler)completion
@end
- Update custom property of the current user.
objc@protocol NIMSuperTeamManager <NSObject>
/**
* Update the custom field of the current user
*
* @param newInfo New value of the custom field
* @param teamId Group ID
* @param completion Completion callback
*/
- (void)updateMyCustomInfo:(NSString *)newInfo
inTeam:(NSString *)teamId
completion:(nullable NIMTeamHandler)completion
@end
Edit the group information
The SDK provides an interface to update multiple fields of group information. This interface can modify multiple properties of a group at a time, such as name and announcement. The passed key-value pair is {@(NIMSuperTeamUpdateTag):NSString}, and invalid data will be filtered. The group owner and administrator can edit the data.
/**
* Update the group profile
*
* @param values group information key-value pair that needs to be updated
* @param teamId Group ID
* @param completion Completion callback
* @discussion This interface can modify multiple attributes of a group at a time, such as name and announcement. The passed key-value pair is {@(NIMSuperTeamUpdateTag): NSString}, and invalid data will be filtered. The group owner and administrator can edit the data.
*/
- (void)updateTeamInfos:(NSDictionary<NSNumber *,NSString *> *)values
teamId:(NSString *)teamId
completion:(nullable NIMTeamHandler)completion;
- NIMSuperTeamUpdateTag
objc/**
* Update a field of a group profile
*/
typedef NS_ENUM(NSInteger, NIMSuperTeamUpdateTag){
/**
* Group name
*/
NIMSuperTeamUpdateTagName = 3,
/**
* Group introduction
*/
NIMSuperTeamUpdateTagIntro = 14,
/**
* Group announcement
*/
NIMSuperTeamUpdateTagAnouncement = 15,
/**
* Verification method
*/
NIMSuperTeamUpdateTagJoinMode = 16,
/**
* Client custom extension fields
*/
NIMSuperTeamUpdateTagClientCustom = 18,
/**
* Server custom extension field
* @discussion SDK cannot directly edit this field. Call the server interface to edit the field.
*/
NIMSuperTeamUpdateTagServerCustom = 19,
/**
* avatar
*/
NIMSuperTeamUpdateTagAvatar = 20,
/**
* Accept invitations
*/
NIMSuperTeamUpdateTagBeInviteMode = 21,
/**
* Mute or unmute a group
* @discussion SDK cannot directly edit this field. Call the server interface to edit the field.
*/
NIMSuperTeamUpdateTagMuteMode = 101,
/**
* Business for anti-spam
*/
NIMSuperTeamUpdateTagAntispamBusinessId = 102,
};
- Parameters
Parameter | Type | Description |
---|---|---|
values | NSString | The key-value pair to be updated. |
teamId | NSString | The group ID. |
completion | NIMTeamHandler | Callback for completion. |
Listen to changes of group members
objc@protocol NIMTeamManagerDelegate <NSObject>
/**
* Callback for group member changes, such as adding or removing members and member profile changes
*
* @param team Group changes
*/
- (void)onTeamMemberChanged:(NIMSuperTeam *)team;
@end
Check the membership of the current user
Check whether the current user is the member of a group by group ID
objc@protocol NIMSuperTeamManager <NSObject>
/**
* Determine if it is my group based on the group ID
*
* @param teamId Group ID
*
* @return result
*/
- (BOOL)isMyTeam:(NSString *)teamId;
@end
Properties
Parameter | Type | Description |
---|---|---|
teamId | NSString | Group ID |
Transfer the ownership of a group
objc@protocol NIMSuperTeamManager <NSObject>
/**
* Transfer the ownership of a group
*
* @param teamId Group ID
* @param newOwnerId New group owner ID
* @param isLeave specify whether to leave the group if the ownership of a group is transferred.
* @param completion Completion callback
*/
- (void)transferManagerWithTeam:(NSString *)teamId
newOwnerId:(NSString *)newOwnerId
isLeave:(BOOL)isLeave
completion:(nullable NIMTeamHandler)completion;
@end
Properties
Parameter | Type | Description |
---|---|---|
teamId | NSString | The group ID. |
newOwnerId | NSString | The ID of the new owner |
isLeave | BOOL | Whether the original owner leaves the group. |
completion | NIMSuperTeamHandler | Callback for completion. |
Assign an administrator
objc@protocol NIMSuperTeamManager <NSObject>
/**
* Add an administrator
*
* @param teamId Group ID
* @param users list of user IDs to be added as administrator
* @param completion Completion callback
*/
- (void)addManagersToTeam:(NSString *)teamId
users:(NSArray<NSString *> *)users
completion:(nullable NIMTeamHandler)completion;
@end
Properties
Parameter | Type | Description |
---|---|---|
users | NSArray<NSString *> | IDs of members assigned administrator |
teamId | NSString | The group ID. |
completion | NIMSuperTeamHandler | Callback for completion. |
Unassign administrator
objc@protocol NIMSuperTeamManager <NSObject>
/**
* Unassign administrators
*
* @param teamId Group ID
* @param users list of user IDs to be revoked the administrator role
* @param completion Completion callback
*/
- (void)removeManagersFromTeam:(NSString *)teamId
users:(NSArray<NSString *> *)users
completion:(nullable NIMTeamHandler)completion;
@end
Properties
Parameter | Type | Description |
---|---|---|
users | NSArray<NSString *> | Ids of members unassigned administrator. |
teamId | NSString | The group ID. |
completion | NIMSuperTeamHandler | Callback for completion. |
Muting
Mute specified members
objc@protocol NIMSuperTeamManager <NSObject>
/**
* Mute a group member
*
* @param mute mute or unmute
* @param userId user ID
* @param teamId Group ID
* @param completion Completion callback
* @discussion If the operation is successful, CommsEase will send a group notification message for banning
*/
- (void)updateMuteState:(BOOL)mute
userIds:(NSArray<NSString *> *)userIds
inTeam:(NSString *)teamId
completion:(nullable NIMTeamHandler)completion;
@end
Properties
Parameter | Type | Description |
---|---|---|
mute | BOOL | Whether a member is muted. |
users | NSArray<NSString *> | user IDs |
teamId | NSString | The group ID. |
completion | NIMSuperTeamHandler | Callback for completion. |
Mute all members
objc@protocol NIMSuperTeamManager <NSObject>
/**
* Mute all group members
*
* @param mute mute or unmute
* @param teamId Group ID
* @param completion Completion callback
* @discussion If the operation is successful, CommsEase will send a group notification message for banning
*/
- (void)updateMuteState:(BOOL)mute
inTeam:(NSString *)teamId
completion:(nullable NIMTeamHandler)completion;
@end
Properties
Parameter | Type | Description |
---|---|---|
mute | BOOL | Whether a member is muted. |
teamId | NSString | The group ID. |
completion | NIMSuperTeamHandler | Callback for completion. |
Check the mute state of a member
objc@protocol NIMSuperTeamManager <NSObject>
/**
* getting the list of muted the members in a group
*
* @param teamId Group ID
* @param completion Completion callback
* @discussion In most cases, the request fetches data from the local cache and return the data synchronously. However, due to the large amount of information about group members, the SDK delays retrieving the information after login. Considering the network and other issues, the SDK may not cache the group member information in time, so this request will be an asynchronous operation (incremental request) with a network request. * At the same time, this interface will request the data information of group users that are not cached locally, but will not trigger - (void)onUserInfoChanged: callback.
*/
- (void)fetchTeamMutedMembers:(NSString *)teamId
completion:(nullable NIMTeamMemberHandler)completion;
@end
Manage group information
Edit group information
The group owner can modify the group information, and the members can only modify their own information. After modifying the group information, you will receive a notification with NIMSuperTeamNotificationContent.
including:
Edit the group information
objc@protocol NIMSuperTeamManager <NSObject>
* Update the group profile
*
* @param values group information key-value pair that needs to be updated
* @param teamId Group ID
* @param completion Completion callback
* @discussion This interface can modify multiple attributes of a group at a time, such as name and announcement. The passed key-value pair is {@(NIMSuperTeamUpdateTag) : NSString}, and invalid data will be filtered data.
*/
- (void)updateTeamInfos:(NSDictionary<NSNumber *,NSString *> *)values
teamId:(NSString *)teamId
completion:(nullable NIMTeamHandler)completion;
@end
Properties
Parameter | Type | Description |
---|---|---|
values | NSDictionary | The key-value pair of the group information to be updated. |
teamId | NSString | The group ID. |
completion | NIMTeamHandler | Callback for completion |
Update the group name
objc@protocol NIMSuperTeamManager <NSObject>
/**
* Update the group name
*
* @param teamName group name
* @param teamId Group ID
* @param completion Completion callback
*/
- (void)updateTeamName:(NSString *)teamName
teamId:(NSString *)teamId
completion:(nullable NIMTeamHandler)completion;
@end
Properties
Parameter | Type | Description |
---|---|---|
teamName | NSString | Group name |
teamId | NSString | The group ID. |
completion | NIMTeamHandler | Callback for completion. |
Update the group avatar
objc@protocol NIMSuperTeamManager <NSObject>
/**
* Update the group avatar
*
* @param teamAvatarUrl group avatar URL
* @param teamId Group ID
* @param completion Completion callback
*/
- (void)updateTeamAvatar:(NSString *)teamAvatarUrl
teamId:(NSString *)teamId
completion:(nullable NIMTeamHandler)completion;
@end
Properties
Parameter | Type | Description |
---|---|---|
teamAvatarUrl | NSString | The URL of the group avatar |
teamId | NSString | The group ID. |
completion | NIMTeamHandler | Callback for completion. |
Change the verification method for join requests
objc@protocol NIMSuperTeamManager <NSObject>
/**
* Update the verification mode for joining a group
*
* @param joinMode verification method
* @param teamId Group ID
* @param completion Completion callback
*/
- (void)updateTeamJoinMode:(NIMTeamJoinMode)joinMode
teamId:(NSString *)teamId
completion:(nullable NIMTeamHandler)completion;
@end
Properties
Parameter | Type | Description |
---|---|---|
joinMode | NIMTeamJoinMode | Verification method |
teamId | NSString | The group ID. |
completion | NIMTeamHandler | Callback for completion. |
Update the verification method for invitations
objc@protocol NIMSuperTeamManager <NSObject>
/**
* Update the verification mode for being invited to join a group
*
* @param joinMode verification method
* @param teamId Group ID
* @param completion Completion callback
*/
- (void)updateTeamBeInviteMode:(NIMTeamBeInviteMode)beInviteMode
teamId:(NSString *)teamId
completion:(nullable NIMTeamHandler)completion;
@end
Update the group introduction
objc@protocol NIMSuperTeamManager <NSObject>
/**
* Update the group profile
*
* @param intro group intro
* @param teamId Group ID
* @param completion Completion callback
*/
- (void)updateTeamIntro:(NSString *)intro
teamId:(NSString *)teamId
completion:(nullable NIMTeamHandler)completion;
@end
Properties
Parameter | Type | Description |
---|---|---|
intro | NSString | The group introduction |
teamId | NSString | The group ID. |
completion | NIMTeamHandler | Callback for completion. |
Update the group announcement
objc@protocol NIMSuperTeamManager <NSObject>
/**
* Update the group announcement
*
* @param announcement group announcement
* @param teamId Group ID
* @param completion Completion callback
*/
- (void)updateTeamAnnouncement:(NSString *)announcement
teamId:(NSString *)teamId
completion:(nullable NIMTeamHandler)completion;
@end
Properties
Parameter | Type | Description |
---|---|---|
announcement | NSString | The group announcement |
teamId | NSString | The group ID. |
completion | NIMTeamHandler | Callback for completion. |
Update the custom field
objc@protocol NIMSuperTeamManager <NSObject>
/**
* Update the custom field of a group profile
*
* @param info user defined info
* @param teamId Group ID
* @param completion Completion callback
*/
- (void)updateTeamCustomInfo:(NSString *)info
teamId:(NSString *)teamId
completion:(nullable NIMTeamHandler)completion;
@end
Properties
Parameter | Type | Description |
---|---|---|
info | NSString | The custom field |
teamId | NSString | The group ID. |
completion | NIMTeamHandler | Callback for completion. |
Listen to changes of group attributes
- Callback for updating the group information
objc@protocol NIMTeamManagerDelegate <NSObject>
/**
* Callback for updating the group information
*
* @param team updated group
*/
- (void)onTeamUpdated:(NIMSuperTeam *)team
@end
- Callback for removing a group
objc@protocol NIMTeamManagerDelegate <NSObject>
/**
* Callback for removing a group
*
* @param team removed group
*/
- (void)onTeamRemoved:(NIMSuperTeam *)team
@end
Group notifications
The message type of group notification is NIMMessageTypeNotification
. After users join a group, the CommsEase server will send a group notification for any changes about the group. Group notification messages are the same as other types of messages, and can be retrieved using the interface in [NIMConversationManager
](https://doc.commsease.com/docs/interface/IMS for iOS/NIMSDKiOS/Protocols/NIMConversationManager.html).
-
Parse group notifications:
- Parse the
messageObject
field ofNIMMessage
and cast the type toNIMSuperTeamNotificationContent
. - Parse the
content
field inNIMSuperTeamNotificationContent
and get the superclassNIMNotificationContent
.toTime
based field inNIMNotificationContent
Cast the type of the superclassNIMSuperTeamNotificationContent
toNIMSuperTeamNotificationContent
based on thenotificationType
field ofNIMSuperTeamNotificationContent
.
- Parse the
-
The specific type of group notifications can be parsed using
operationType
ofNIMTeamNotificationContent
. -
After receiving group notifications, the SDK will modify the locally cached group information, and trigger the callback for the delegate event related to the edit event.
-
Group notifications are received in groups. You cannot manually create and send group notifications.
NIMSuperTeamNotificationContent representation:
operationType
: the event type, indicating which event happens in a group. The notification type is defined in theNIMTeamOperationType
enumeration.source
: The operator ID of the notification, indicating who performs an operation.targets
: A list of target IDs, indicating the targets of the operation.notifyExt
: The extension field of the notification, defined by each operation interface that triggers the notification. This field can only be specified by the server API.
For example:
To remove a user out of a group, you can call the Server API with the notification extension parameter. After calling the API, the event for the operation is triggered and the notification that the user is removed out of the group is sent. At this time, other group members who receive the notification can read the notifyExt
field of NIMTeamNotificationContent
to get the extension field defined for the removing a member.
attachment
: notification attachment used to assist the upper layer for display. The types of group notifications with additional information are:NIMTeamOperationTypeUpdate
: the additional information is wrapped asNIMUpdateTeamInfoAttachment
type.
Do-Not-Disturb
- Edit the mute state of a group
objc@protocol NIMSuperTeamManager <NSObject>
/**
* Edit the mute state of a group
*
* @param state group notification state
* @param teamId Group ID
* @param completion Completion callback
*/
- (void)updateNotifyState:(NIMTeamNotifyState)state
inTeam:(NSString *)teamId
completion:(nullable NIMSuperTeamHandler)completion;
@end
Properties
Parameter | Type | Description |
---|---|---|
state | NIMTeamNotifyState | Group notification status. |
teamId | NSString | Group ID |
completion | NIMSuperTeamHandler | Callback for completion. |
- Query the mute status of a group
objc@protocol NIMSuperTeamManager <NSObject>
/**
* Query the mute state of a group
*
* @param teamId Group ID
*
* @return state
*/
- (NIMTeamNotifyState)notifyStateForNewMsg:(NSString *)teamId;
@end
Properties
Parameter | Type | Description |
---|---|---|
teamId | NSString | Group ID |