Skip to content

Commit

Permalink
fixing mod_event_pusher:push_event/3 function
Browse files Browse the repository at this point in the history
  • Loading branch information
DenysGonchar committed Jan 24, 2023
1 parent a34a3e5 commit 078ef4b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/event_pusher/mod_event_pusher.erl
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,11 @@
%% @doc Pushes the event to each backend registered with the event_pusher.
-spec push_event(mongoose_acc:t(), Host :: jid:server(), Event :: event()) -> mongoose_acc:t().
push_event(Acc, Host, Event) ->
{ok, HostType} = mongoose_domain_api:get_host_type(Host),
lists:foldl(fun(B, Acc0) ->
B:push_event(Acc0, Host, Event) end,
Acc,
ets:lookup_element(ets_name(Host), backends, 2)).
ets:lookup_element(ets_name(HostType), backends, 2)).

%%--------------------------------------------------------------------
%% gen_mod API
Expand Down

0 comments on commit 078ef4b

Please sign in to comment.