How to use Go to create account and add/remove friend in ejabberd?

huangapple go评论87阅读模式
英文:

How to use Go to create account and add/remove friend in ejabberd?

问题

我找到了这个库:golang xmpp,它是一个相当底层的库(暴露了xmpp协议的细节)。我花了一些时间来研究它,但是非常耗时。因为现在我只需要三个功能:

  1. 创建账号
  2. 添加好友(我认为应该分为发送请求/批准请求)
  3. 删除好友

所以,有人可以告诉我如何在这个库中实现这些功能吗?

英文:

I found this library: golang xmpp, and it is quite low level (exposed the details of xmpp protocol).I took some time to dig into it, but quite time consuming. Since,right now,I just need three functions:

  1. create account
  2. add friend(I think it should be divided into send request/approve request)
  3. remove friend

So, can anybody tell me how to do it in this library?

答案1

得分: 1

我假设你想从后端管理一个XMPP服务器。我不会使用XMPP机器人来执行这些任务。

你应该考虑使用ejabberd XMLRPC API来执行这些任务。所有ejabberdctl可用的命令都被公开了。这意味着你可以使用该API来控制ejabberd的许多行为。

英文:

I assume you want to manage an XMPP server from you backend. I would not use an XMPP bot to perform those task.

You should consider using ejabberd XMLRPC API to perform those tasks. All commands available from ejabberdctl are exposed. It means that you can control a lot of ejabberd behaviour using that API.

huangapple
  • 本文由 发表于 2014年10月7日 23:28:11
  • 转载请务必保留本文链接:https://go.coder-hub.com/26239675.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定