SDKsiOS
Reset group-mention state
Reset a conversation’s group-mention state to normal with OpenIM iOS SDK.
Invoke resetConversationGroupAtType:onSuccess:onFailure: to reset the @ mention alert state of a specified group conversation to normal after the user has viewed or handled mention messages:
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
conversationID | NSString * | Yes | Target group conversation ID. |
Code example
[[OIMManager manager] resetConversationGroupAtType:@"group_2001"
onSuccess:^(NSString * _Nullable data) {
NSLog(@"resetConversationGroupAtType success");
}
onFailure:^(NSInteger code, NSString *message) {
NSLog(@"resetConversationGroupAtType failed: %ld %@", (long)code, message);
}];Return value
The onSuccess callback returns confirmation when the operation succeeds.
State changes after the call
- Local state update: The conversation's
groupAtTypeproperty is reset to normal (OIMGroupAtTypeNormal), clearing any special@mention badge or indicator on the conversation item. - Event notification: Updated conversation properties are broadcast via the
onConversationChanged:delegate callback. Match conversations byconversationIDto refresh list presentation. - Re-query calibration: Group
@mention status is independent from message read status. If the local cache needs verification, callgetConversationsWithIDs:onSuccess:onFailure:or re-query the conversation list. To mark messages as read, refer to Mark a conversation as read. For conversation listener setup, refer to Retrieve conversation list.
Was this page helpful?