Hello, is there a straightforward way to query/filter messages in a channel by meta array values? What I want to achieve is to be able to see a list of messages that contain a specific key/value pair in meta arrays.
I am using the metaArrays to indicate whether a user is starring a certain message, and I’d need to be able to fetch only the starred messages.
I’ve managed to achieve what I’d like by filtering the messageList array in SBUChannelViewController (we are using the uikit sources to customize the views by our needs), but I’d need a separate function that would be able to get the starred messages without the need to fetch all the messages in first place.
if let userId = SBDMain.getCurrentUser()?.userId {
starredMessages = fullMessageList.filter({ $0.metaArrays(withKeys: ["starring"]).flatMap({ $0.value }).contains(userId) })
}
I am using SendBirdSDK 3.0.234