0

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?

rangarajan
  • 143
  • 5
  • 17

1 Answers1

1

Take a look at mod_block_strangers:

This module allows to block/log messages coming from an unknown entity. If a writing entity is not in your roster, you can let this module drop and/or log the message.

Badlop
  • 3,840
  • 1
  • 8
  • 9