简体   繁体   中英

Can I create custom REST API on ejabberd?

I want to send data to ejabberd server using my own custom REST API. Just like ejabberd REST APIs /api/send_message . Is it possible? Or can I call my custom module directly with using hooks?

send_message is implemented in mod_admin_extra.erl

You can:

A) Edit the source code of that command, so your custom send_message code will do what you want.

B) Or copy the code of that command in that file, and add a new command called send_message_faaiq in that file that will do what you want.

C) Or you can create your own module, mod_faaiq.erl, copy that code, and change it to suit your needs.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM