xmppxmpp4r

Using XMPP, can I send a message without subscription?


I am currently writing a XMPP bot using xmpp4r (Ruby) but when it sends a message to a user using the same XMPP server, it does not deliver to the user. My condition is:

  1. The bot user is registered at XMPP server x.
  2. The human user who will get the message is also registered at same XMPP server x.
  3. Both users are connected to that server and are online.
  4. There is no subscription or invite between users.
  5. At this time, the bot user needs to send a message to the human user.

Is this possible, or what can I do to send message from bot?


Solution

  • It is certainly possible (and intended behavior) to deliver messages to XMPP entities where the sending entity has a subscription state of 'none'.

    I suggest you have a look at the server logs or listen for error messages to determine why the message isn't delivered.