search Messages By User
public abstract void searchMessagesByUser(ConversationType conversationType, String targetId, String channelId, String userId, int count, long beginTime, IRongCoreCallback.ResultCallback<List<Message>> resultCallback)
Searches for messages in a specified conversation based on user ID.
Note: To make custom messages searchable, the getSearchableWord method must be implemented in the custom message. For ultra group conversations, only messages stored locally can be searched.
Since
5.1.1
Parameters
conversation Type
The specified conversation type.
target Id
The specified conversation ID.
channel Id
The business identifier of the conversation to which the message belongs.
user Id
The user ID.
count
The number of search results to return 0 < count <= 100
. If count
> 100
, 100 results will be returned.
begin Time
The start time for the search query. Pass 0 to start searching from the latest message, searching backward from this time.
result Callback
Callback for search results.