ドキュメント

サポート

Vivox Unreal SDK

Vivox Unreal SDK

Retrieve conversations list

Learn how to retrieve a list of recent conversations.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

You can retrieve a user’s list of conversations. A conversation is a channel where a user has sent a message or a direct message (DM). You can use this API to populate a list of channels or DMs for a user to find their active chats.
The returned Conversation list is ranked by most recent activity. Conversations with newer messages show up first in the results.
To retrieve the conversation list, sign in to the application and then use vx_req_account_get_conversations to make a request. This request returns:
  • The number of conversations.
  • The next cursor if there is a next page.
  • The list of conversations for this page.
The following code is an example of how to retrieve a user’s conversation list.
vx_req_account_get_conversations *req;vx_req_account_get_conversations_create(&req);req->cursor = 1; // Optional parameter if you’re fetching anything but the first pagereq->request_time = 1697135622123456; // Optional, unix time in microseconds, needs to be set to the same time to keep results consistent between pagesreq->page_size = 10; // Optional, otherwise server default is used. Default is 10vx_issue_request2(&req->base);
After you retrieve the user’s conversation list, the game must process the vx_resp_account_get_conversations_t response:
void HandleAccountGetConversationsResponse(vx_resp_account_get_conversations_t *resp){ // Handles the response, if a next-cursor exists in the response this can be used // to fetch the next page}