Skip to content

Commit

Permalink
Fix run undefined host_type for c2s
Browse files Browse the repository at this point in the history
  • Loading branch information
vkatsuba committed Aug 31, 2021
1 parent 6cf4127 commit c97219b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/ejabberd_c2s.erl
Original file line number Diff line number Diff line change
Expand Up @@ -1651,6 +1651,9 @@ send_element_from_server_jid(Acc, StateData, #xmlel{} = El) ->

%% @doc This is the termination point - from here stanza is sent to the user
-spec send_element(mongoose_acc:t(), exml:element(), state()) -> mongoose_acc:t().
send_element(Acc, El, #state{host_type = undefined} = StateData) ->
Res = do_send_element(El, StateData),
mongoose_acc:set(c2s, send_result, Res, Acc);
send_element(Acc, El, #state{host_type = HostType} = StateData) ->
Acc1 = mongoose_hooks:xmpp_send_element(HostType, Acc, El),
Res = do_send_element(El, StateData),
Expand Down

0 comments on commit c97219b

Please sign in to comment.