发送消息mongoose-im不成功

时间:2017-01-07 10:52:04

标签: mongoose-im

我想发送消息,我打电话给api。

curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{"caller":"maituanmte%40localhost","to":"admin%40localhost","body": "Hi all"}' 'http://localhost:8088/api/messages'

状态= 204,身体反应没有内容。但当我通过

收到消息时
curl -X GET --header 'Accept: application/json' 'http://localhost:8088/api/messages/admin%40localhost'

然后status = 200和body = [](没有消息)。我有交换管理员和maituanmte,但结果相同。

请帮帮我。感谢

1 个答案:

答案 0 :(得分:1)

仅在启用mod_mam时才会从服务器返回消息。您能否确认已启用并配置此模块? 我推荐使用来自master branch [1]的MongooseIM,因为最近MAM配置被大大简化了[2],[3]

[1]。 https://github.com/esl/MongooseIM

[2]。 https://github.com/esl/MongooseIM/blob/master/doc/modules/mod_mam.md

[3]。 http://mongooseim.readthedocs.io/en/latest/modules/mod_mam/

相关问题