Skip to content

Commit

Permalink
Merge remote-tracking branch 'processone/pr/345'
Browse files Browse the repository at this point in the history
* processone/pr/345:
  fix returned tuple from s2s_receive_packet handler
  • Loading branch information
weiss committed Jan 8, 2025
2 parents c0d2e89 + b34f77d commit 9e747bf
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions mod_spam_filter/src/mod_spam_filter.erl
Original file line number Diff line number Diff line change
Expand Up @@ -286,9 +286,14 @@ code_change(_OldVsn, #state{host = Host} = State, _Extra) ->
%% Hook callbacks.
%%--------------------------------------------------------------------
-spec s2s_receive_packet({stanza() | drop, s2s_in_state()})
-> {stanza() | drop | {stop, drop}, s2s_in_state()}.
-> {stanza() | drop, s2s_in_state()} | {stop, {drop, s2s_in_state()}}.
s2s_receive_packet({A, State}) ->
{sm_receive_packet(A), State}.
case sm_receive_packet(A) of
{stop, drop} ->
{stop, {drop, State}};
Result ->
{Result, State}
end.

-spec sm_receive_packet(stanza() | drop) -> stanza() | drop | {stop, drop}.
sm_receive_packet(drop = Acc) ->
Expand Down

0 comments on commit 9e747bf

Please sign in to comment.