IMSDK
IM features a comprehensive suite of solutions including global access, one-to-one chat, group chat, message push, profile and relationship chain hosting, and account authentication. It also provides complete app access and backend management APIs.
V2TIMMessageSearchResultItem

Public Member Functions

 V2TIMMessageSearchResultItem ()
 
 V2TIMMessageSearchResultItem (const V2TIMMessageSearchResultItem &)
 
 ~V2TIMMessageSearchResultItem ()
 

Data Fields

V2TIMString conversationID
 
uint32_t messageCount
 
V2TIMMessageVector messageList
 

Constructor & Destructor Documentation

◆ V2TIMMessageSearchResultItem() [1/2]

◆ V2TIMMessageSearchResultItem() [2/2]

◆ ~V2TIMMessageSearchResultItem()

Field Documentation

◆ conversationID

V2TIMString conversationID

Get the conversation ID.

◆ messageCount

uint32_t messageCount

Get the total number of messages that match the search conditions in the current conversation.

◆ messageList

V2TIMMessageVector messageList

Get a list of messages that match the search conditions

If you search a specific conversation, messageList will contain all matching messages in that conversation.

If you search all conversations, either of the following two cases will apply:

  • If there is more than one matching message in a conversation, messageList will be empty. You can display a message like "messageCount results found" on the UI.
  • If there is only one matching message in a conversation, messageList will contain that message. You can display the message on the UI with the matching keywords highlighted.