Mod:remove_room(LServer, LName, LHost),
ok.
+-spec remove_mam_for_user(binary(), binary()) ->
+ {ok, binary()} | {error, binary()}.
remove_mam_for_user(User, Server) ->
LUser = jid:nodeprep(User),
LServer = jid:nameprep(Server),
{error, <<"Db returned error">>}
end.
+-spec remove_mam_for_user_with_peer(binary(), binary(), binary()) ->
+ {ok, binary()} | {error, binary()}.
remove_mam_for_user_with_peer(User, Server, Peer) ->
LUser = jid:nodeprep(User),
LServer = jid:nameprep(Server),
US = {LUser, LServer},
Peer = jid:remove_resource(jid:split(WithJid)),
F = fun () ->
- Msgs = mnesia:match_object(archive_msg,
- #archive_msg{us = US, bare_peer = Peer, _ = '_'}),
+ Msgs = mnesia:match_object(#archive_msg{us = US, bare_peer = Peer, _ = '_'}),
lists:foreach(fun mnesia:delete_object/1, Msgs)
end,
case mnesia:transaction(F) of