Why blocked users are able to message each other

Hello,

I have blocked a user using
UserRepository.Relationship.blockUser('userId');
but still both the blocked user and the one who blocked him are able to send message to each other. Why does it happen?

Looking for your prompt response,
Aamir Shehzad

Hello @aamir.shehzad , the blocking feature you mentioned is currently available only for the social part and not for chat. As a solution, you’ll need to implement frontend logic to determine if a user has been blocked. This might involve adding the user ID of the person who performed the block to the blocked user’s metadata. Then, you can hide the UI option that allows the blocked user to send messages to that specific user.

We will submit this as a feature request for our team to consider as a potential future enhancement.