diff options
author | Holger Weiss <holger@zedat.fu-berlin.de> | 2017-07-07 14:28:22 +0200 |
---|---|---|
committer | Holger Weiss <holger@zedat.fu-berlin.de> | 2017-07-07 14:28:22 +0200 |
commit | f6bdc6fdb2ee4a6bc4323a82f647b8795acab2a2 (patch) | |
tree | 1d77c337ebe68ff8dd6dfe25a63e5795e2ed8351 | |
parent | mod_privacy: Apply cosmetic change to type spec (diff) |
mod_privacy: Don't crash while copying c2s state
Don't assume 'privacy_active_list' is set when c2s_copy_session/2 is
called.
-rw-r--r-- | src/mod_privacy.erl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mod_privacy.erl b/src/mod_privacy.erl index 7725b5d92..85384610d 100644 --- a/src/mod_privacy.erl +++ b/src/mod_privacy.erl @@ -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, |