Skip to content

Commit

Permalink
Catch extra case in check for s2s bidi element
Browse files Browse the repository at this point in the history
  • Loading branch information
prefiks committed Nov 5, 2024
1 parent af97211 commit d56eae8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/mod_s2s_bidi.erl
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,14 @@ s2s_out_unauthenticated_features(#{db_verify := _} = State, _) ->
s2s_out_unauthenticated_features(State, #stream_features{} = Pkt) ->
try xmpp:try_subtag(Pkt, #s2s_bidi{}) of
#s2s_bidi{} ->
ejabberd_s2s_out:send(State#{bidi_enabled => true}, #s2s_bidi{})
ejabberd_s2s_out:send(State#{bidi_enabled => true}, #s2s_bidi{});
_ ->
State
catch _:{xmpp_codec, _Why} ->
State
end.
end;
s2s_out_unauthenticated_features(State, _Pkt) ->
State.

s2s_out_packet(#{bidi_enabled := true, ip := {IP, _}} = State, Pkt0)
when ?is_stanza(Pkt0) ->
Expand Down

0 comments on commit d56eae8

Please sign in to comment.