Channel-based chat history for blocked participants
Learn how blocked participants are handled in channel chat history.
Read time 1 minuteLast updated 2 days ago
You can filter messages from blocked users when formatting the history_session query responses.
When retrieving the chat history from a channel, the SDK omits messages from blocked users. If User A has User B blocked in the application, User A does not see messages sent by User B.
History sessions when blocked participants are involved
A history request can come back empty if all messages in the request are from a blocked participant. In this case, the response contains a cursor indicating that there are more messages in the channel on subsequent pages. The default amount of messages returned per history request is 10 per page. Use the cursor value in the following request to retrieve the next page of messages.
The maximum page size argument (Max) shows fewer messages than the number requested if there is a blocked user in the channel. When you request a specific page size for your chat history, be aware that history_session might display fewer messages than your chosen number if there are blocked users in the channel. This functionality is crucial to ensure privacy and prevent unwanted interactions.
The last read displays a count of unread messages. Vivox keeps track of your read messages and provides a count of unread messages. However, note that this count includes blocked messages, which are deliberately filtered from your response. The count of unread messages might be inaccurate if there are blocked users in the channel.