Overview
Users may experience an issue with the getSilentMode(for: [AgoraChatConversation]) method in the Agora iOS SDK, where an unwanted string is appended to the conversation ID. This results in the inability to retrieve the correct notification status for the last conversation in the array. This article provides a description of the issue, a workaround, and details about the ongoing investigation.
Issue Description
When using the getSilentMode(for: [AgoraChatConversation]) method to retrieve the silent mode status for multiple conversations, users may encounter the following:
- An unwanted string, such as "resource=ios_<YourConversationID>", is appended to the last conversation’s ID.
- This results in an invalid conversation ID, preventing the user from receiving the correct status for that conversation.
- In contrast, using the method getSilentMode(forConversation: String, conversationType: AgoraChatConversationType) for individual conversations does not produce this issue, but it is slower for processing multiple conversations.
Affected Environment
- Platform: iOS
- SDK Version: 1.3.1
Steps to Reproduce
a. Prepare a list of multiple AgoraChatConversation objects.
b. Call the batch method:
AgoraChatClient.shared().pushManager?.getSilentMode(for: [AgoraChatConversation])
c. Inspect the returned dictionary [String: AgoraChatSilentModeResult].
d. Observe that the key for the last conversation includes an incorrect suffix like:
"d-8resource=ios_<YourConversationID>
e. Attempt to match this key with the original conversation IDs – the mismatch causes the status to be missing for the last conversation.
f. Optionally, call the individual method for the same conversation and confirm it returns the correct status:
AgoraChatClient.shared().pushManager?.getSilentMode(forConversation: "conversationId", conversationType: .chat)
Workaround
While the issue is being investigated, users are advised to use the method for individual conversations as a temporary solution:
[[AgoraChatClient sharedClient].pushManager getSilentModeForConversation:@"conversationId" conversationType:AgoraChatConversationTypeChat completion:^(AgoraChatSilentModeResult * _Nullable aResult, AgoraChatError * _Nullable aError) {}];
This method returns the correct status without the issue but may require more time to process if there are many conversations.
-
Internal Investigation
: The issue has been identified as a bug in the batch method for retrieving silent mode status. The Agora Chat SDK engineering team is actively working on a fix, which will be released as soon as possible. - Users are encouraged to provide any relevant logs or details to assist in the investigation.
SDK Logs
For more information on how to collect SDK logs, refer to the documentation: Agora Chat SDK Logs.
Conclusion
If you are still experiencing issues or need further assistance, please reach out to Agora Support. We appreciate your patience as we work on resolving this issue. Thank you for your understanding!