Documentation

Support

Vivox Unreal SDK

Vivox Unreal SDK

Get last read message information from a given channel

Learn how to retrieve the last read message in a channel.
Read time 1 minuteLast updated 2 days ago

To get the last read message information, you need to sign in and connect to at least one channel. You can then use vx_req_account_chat_history_get_last_read to make a request. This will return:
  • The last read message ID
  • The time stamp of when that message was read
  • The number of messages that are unread in the specified channel
The following code is an example of how to get the last read information from a channel. This assumes that you have already successfully added a session.
vx_req_account_chat_history_get_last_read *req;vx_req_account_chat_history_get_last_read_create(&req);req->account_handle = vx_strdup("sip:.issuer.playerName@mt1s.vivox.com");req->session_handle = vx_strdup("mychannel");vx_issue_request2(&req->base);
After you receive this information, the game then must process the vx_resp_account_chat_history_get_last_read_t response:
void HandleAccountGetLastReadResponse(vx_resp_account_chat_history_get_last_read_t *resp){ // Handles the response, uses the number of unread messages to fetch history}