2
votes

I have to create a chat app for my company, and, since I do programming in Elixir, my choice is ejabberd with Erlang/Elixir. I managed to install ejabberd as a dependency into my Elixir project, configured it, and I am also able to connect to it with some XMPP clients from the outside.

What I still need to achieve is to create a web based interface for the users where they can see the messages of certain conversations and where they also can push in text messages into ejabberd. Phoenix with it's channels are a perfect tool for this.

The missing parts I'm trying to figure out are some direct function calls into the ejabberd internals. Namely the followings are missing:

  • how can I do my own authentication in ejabberd with my already existing user base? (Erlang or Elixir)
  • how do I set the presence of a user with internal ejabberd function calls, when one uses it from Phoenix?
  • how can I tap into the message flow that goes trough ejabberd in order to broadcast those messages using Phoenix channels?
  • how can I send ejabberd messages from Erlang or Elixir in the name of a user?

I'm afraid ejabberd is poorly documented and it's mostly the source code that cen help me out. But I hope I'm wrong and there are some tutorials, blog posts, videos about the internals of it.

I would really appreciate any links to howtos, blog posts, example repos related to the internal Erlang API of ejabberd.

Here are what I already have, but this just scratches the surface:

elixir-sips-ejabberd-with-elixir-part-1

ejabberd-joins-the-elixir-revolution

2

2 Answers

0
votes

There is the developers guide in the official documentation: https://docs.ejabberd.im/developer/guide/

But full API is not documented, no.