2
votes

I am developing something with ejabberd server. I came to the need of changing the subscription logic. I am using ejabberd-2.1.11

My need is on how the subscription works, I would like to change the logic so that users upload their roster contact with subscription both automatically and and save in in the rosterusers table-colum subscription immediately to be B. So that they should be able to see online and in their contacts at least when the first one has already registered to the server. ( hope this make sense for you and is valid)

I am a very beginner in erlang and ejabberd architecture but I have already developed some basic modules, my question to you is if you could help me on this regard, how difficult is to make this change and if you could give me some hints where the changes would be

1
My guess is that the running server wouldn't know anything about your direct changes to the database, thus the server would get out of sync and possibly have unpredictable results.Robin
can you be more specific? maybe an example with userA and userB would helpuser601836
Hey @Bran - Were you able to implement the above feature? There are multiple people who are looking for such a feature. It would be really helpful if you could provide some of your learning on this.PythonEnthusiast

1 Answers

0
votes

I'd stay away from modifying the server, it conforms to standards and follows the specification. So if you ever need to move to another server or upgrade, you know it's just going to work. What you would do to achieve this is implement this behavior on the client using the server's features. If you are really sure you want to modify the server, mod_roster.erl is the file you want to be looking at. If using an external DB, you can also modify the DB directly, but changes won't be reflected until the clients log back in.