I’m using ejabberd as the basis for a notification service.
A user (we’ll call it notifyme@server.com) acts as a bot, sending out notifications to the various users registered on the system.
I want to disable chat between users, so that they can only send and receive messages with notifyme@server.com and not each other.
I’ve achieved the rostering using a patch to ejabberd and shared rosters, so the only contact they can see is notifyme@server.com and they can’t add more, but they are still able to send a message to another user and it will be received.
TL;DR How can I make it so that users can only message users on their roster?
Thanks for any help you can provide 🙂
In a normal setup, you can achieve that using a privacy list(xep-0016) rule that specifies you only want to send/receive messages from users on your roster. But users can modify their privacy list, so I guess that’s not acceptable in your case.
You probably need to write a custom ejabberd module for your need, or modify mod_privacy to always enforce that rule and don’t let the client modify it.