Browse SDKs · iOS
SDKsiOSEnterprise

Update a conversation group

Update a conversation group with Open_im_sdkUpdateConversationGroup.

Copy

Use Open_im_sdkUpdateConversationGroup to modify an existing conversation group. conversationGroupID is required; include only the fields that this operation needs to update.

Parameters

FieldRequiredDescription
conversationGroupIDYesThe target conversation-group ID.
nameNoThe new group name.
exNoThe new application-defined extension string.
hiddenNoWhether to hide the group.
NSDictionary *request = @{
    @"conversationGroupID": conversationGroupID,
    @"name": @"Priority work",
    @"hidden": @NO,
};
NSData *requestData = [NSJSONSerialization dataWithJSONObject:request options:0 error:nil];
NSString *requestJSON = [[NSString alloc] initWithData:requestData
                                              encoding:NSUTF8StringEncoding];

Pass your callback and requestJSON to Open_im_sdkUpdateConversationGroup.

Result

The success callback's data is the updated group as a JSON object. Merge it by conversationGroupID. Other signed-in clients or later synchronization may receive onConversationGroupChanged:. For the complete listener, see Conversation groups overview.