25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-24 16:23:40 +01:00

mod_privacy: Don't crash while copying c2s state

Don't assume 'privacy_active_list' is set when c2s_copy_session/2 is
called.
This commit is contained in:
Holger Weiss 2017-07-07 14:28:22 +02:00
parent 8f25baada6
commit f6bdc6fdb2

View File

@ -412,7 +412,9 @@ decode_item(#privacy_item{order = Order,
-spec c2s_copy_session(c2s_state(), c2s_state()) -> c2s_state().
c2s_copy_session(State, #{privacy_active_list := List}) ->
State#{privacy_active_list => List}.
State#{privacy_active_list => List};
c2s_copy_session(State, _) ->
State.
-spec user_send_packet({stanza(), c2s_state()}) -> {stanza(), c2s_state()}.
user_send_packet({#iq{type = Type,