Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to add mod_restfull #23

Open
aerlijman opened this issue Jun 4, 2014 · 6 comments
Open

How to add mod_restfull #23

aerlijman opened this issue Jun 4, 2014 · 6 comments

Comments

@aerlijman
Copy link

Hi,

Sorry for this simple question but I haven´t got much experience in linux. I installed in CentOS ejabberd using this tutoria https://www.digitalocean.com/community/articles/how-to-install-ejabberd-on-a-centos-5-and-centos-6-vps that says basically execute sudo yum install ejabberd

But I can´t get to add this module. Where should I put it to compile and which version should I use?
thx

@jadahl
Copy link
Owner

jadahl commented Jun 10, 2014

First, you need to find out what version of ejabberd you are running.

If its the ejabberd Community Edition then you should just be able to run "make" and copy the resulting ".beam" files into wherever ejabberd happen to store its .beam files on your system.

If its 2.1.* then you need to check out the 0.1.x branch of mod_restful. Also in that case you need to have the ejabberd source code available. Because of laziness, you need ejabberd source code next to mod_restful, run "make" and then copy the .beam files in the same way as mentioned above.

@aerlijman
Copy link
Author

Thx... just before you reply.. got it. For the record, the thing was changing the paths in the make file. Both ejabberd and ejabberd src where in different location.

By the way.. Is there a way to add contacts to a user list using this module?
Thx again

@jadahl
Copy link
Owner

jadahl commented Jun 11, 2014

You can probably use the "admin" API in some way to do it, as it just runs the admin commands. Otherwise if you want to design an API, mod_restful is designed to be easily add new API modules, but for that you need to know Erlang.

@aerlijman
Copy link
Author

So, you are saying I can send this iq stanza for example? how to do that with restful??

@aerlijman
Copy link
Author

<iq from='[email protected]/balcony' type='get' id='roster_1'>
  <query xmlns='jabber:iq:roster'/>
</iq> 

@mkonecny
Copy link

I was able to get it compiled on Ubuntu 12.04, by getting the source as you described (apt-get source ejabberd). I also needed to get the source code for eunit (apt-get source erlang-eunit)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants