diff --git a/mod_rest/src/mod_rest.erl b/mod_rest/src/mod_rest.erl index 6983745..42a35f1 100644 --- a/mod_rest/src/mod_rest.erl +++ b/mod_rest/src/mod_rest.erl @@ -145,8 +145,8 @@ ip_matches(ClientIp, AllowedValues) -> AllowedValues). post_request(Pkt) -> - mod_mam:user_send_packet(Pkt, #{jid => Pkt#message.from}, Pkt#message.from, Pkt#message.to), - case ejabberd_router:route(Pkt#message.from, Pkt#message.to, Pkt) of + mod_mam:user_send_packet({Pkt, #{jid => Pkt#message.from}}), + case ejabberd_router:route(Pkt) of ok -> {200, [], <<"Ok">>}; _ -> {500, [], <<"Error">>} end.