I have just started on with ejabberd server. My question is how to send message from ejabberd server to multiple clients. I was able to send message to a single client using the command:
ejabberdctl send_message chat 192.168.33.50 [email protected] "subject" "message from server"
(where 192.168.33.50 is the IP address of the machine running ejabberd) However, I could not find a way to send to multiple clients at once. I suppose the method would be to create a group, add users to the group and send message to the group.
I tried to the following commands to create a group and add users to it:
ejabberdctl srg_create group1 192.168.33.50 "group1" "group1" "group1"
ejabberdctl srg_user_add user1 192.168.33.50 group1 192.168.33.50
ejabberdctl srg_user_add user2 192.168.33.50 group1 192.168.33.50
However, when I tried sending message with the following command using the group name instead of user name, no message was sent from the server:
ejabberdctl send_message chat 192.168.33.50 [email protected] "subject" "message from server"
So I wanted to know how I can achieve my use case of sending messages to multiple clients from the ejabberd server?