0
votes

I am using Ejabberd server from the source code in Linux. My situation is,if I need presence of someone then I need to add him/her in my roster and approved his/her presence request. Since I am interested in presence of a single contact at a time so it is useless for me to add lots of contacts in roster with presence approved. So I want some mechanism by which I send the presence request to someone and this request will be approved instantly by the server irrespective of the other contacts available online to approve the request or not. I am using Ejabberd 17.11 version and backend SQL for storing most of the data on the Linux Mint.

In short, Ejabberd server should automatically approve all the presence request instead of forwarding the request to the contact and wait for the approval.

2

2 Answers

1
votes

As per RFC3921 https://xmpp.org/rfcs/rfc3921.html#presence, A user's server MUST NOT automatically approve subscription requests on the user's behalf. All subscription requests MUST be directed to the user's client, specifically to one or more available resources associated with the user.

I would suggest to move auto approval functionality to client side.

1
votes

Hi I'm using an enhanced ejabberd named MongooseIM. I have written some articles about ejabberd on TechTalk in Chinese.

If you want to auto approval the presence, you must modify ejabberd_c2s:process_outgoing_stanzaand mod_roster:process_subscription_transaction to break the origin approval flow in MongooseIM.

I think you can do the same thing in ejabberd.