Get last read message information from a given channel
How to get last read message information from a given channel
Read time 1 minuteLast updated 20 hours 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- 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.
After you receive this information, the game then must process thevx_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);
vx_resp_account_chat_history_get_last_read_tvoid HandleAccountGetLastReadResponse(vx_resp_account_chat_history_get_last_read_t *resp){ // Handles the response, uses the number of unread messages to fetch history}