Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想使用我自己的自定义 REST API 将数据发送到 ejabberd 服务器。就像 ejabberd REST API 一样/api/send_message。是否可以?或者我可以使用钩子直接调用我的自定义模块吗?
/api/send_message
send_message实施于mod_admin_extra.erl
send_message
mod_admin_extra.erl
你可以:
A) 编辑该命令的源代码,因此您的自定义 send_message 代码将执行您想要的操作。
B)或复制该文件中该命令的代码,并在该文件中添加一个名为 send_message_faaiq 的新命令,该命令将执行您想要的操作。
C) 或者您可以创建自己的模块 mod_faaiq.erl,复制该代码,然后根据您的需要进行更改。