I have created users in ejabberd server using REST API.
Using send_message
API, I could send messages directly to any user using their jabberd id.
But I need to restrict the users to send/receive messages only with their roster items.
For example,
There is two users, user1@localhost
and user2@localhost
Now the user2
is not the roster item of user1
.
Here, the user2
should be restricted to send direct messages to user1
.
Only after adding user2
to the roster item of user1
, the user2
could send messages to user1
and it should be handles in the backed.
Is there any ejabberd modules to do it or is there any other ways to do it?