Skip to content

Commit

Permalink
Fail if muclight fails
Browse files Browse the repository at this point in the history
  • Loading branch information
NelsonVides committed Sep 24, 2022
1 parent 3135773 commit 6768524
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/muc_light/mod_muc_light.erl
Original file line number Diff line number Diff line change
Expand Up @@ -420,13 +420,15 @@ remove_user(Acc, User, Server) ->
Acc
end.

-spec remove_domain(mongoose_hooks:simple_acc(),
mongooseim:host_type(), jid:lserver()) ->
mongoose_hooks:simple_acc().
-spec remove_domain(mongoose_domain_api:remove_domain_acc(), mongooseim:host_type(), jid:lserver()) ->
mongoose_domain_api:remove_domain_acc().
remove_domain(Acc, HostType, Domain) ->
MUCHost = server_host_to_muc_host(HostType, Domain),
mod_muc_light_db_backend:remove_domain(HostType, MUCHost, Domain),
Acc.
F = fun() ->
MUCHost = server_host_to_muc_host(HostType, Domain),
mod_muc_light_db_backend:remove_domain(HostType, MUCHost, Domain),
Acc
end,
mongoose_domain_api:remove_domain_wrapper(Acc, F, ?MODULE).

-spec add_rooms_to_roster(Acc :: mongoose_acc:t(), UserJID :: jid:jid()) -> mongoose_acc:t().
add_rooms_to_roster(Acc, UserJID) ->
Expand Down

0 comments on commit 6768524

Please sign in to comment.