2017-01-07 55 views
0

我想發送一條消息,我打電話給api。發送消息mongoose-im不成功

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' 

status = 204和body response no content。但是,當我通過

curl -X GET --header 'Accept: application/json' 'http://localhost:8088/api/messages/admin%40localhost' 

然後狀態= 200和體= [](沒有郵件)得到的消息。我有交換管理員和maituanmte但結果相同。

請幫幫我。謝謝

回答

1

只有啓用mod_mam時纔會從服務器返回消息。你能否確認你已經啓用並配置了該模塊? 我推薦從master分支[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/

+0

謝謝michalwski。這是賴特。默認情況下,mod_man未啓用。 –