From 6b2b89da78c3fcecb126e29f8eee2e33ae8b1ab8 Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Fri, 8 Dec 2023 18:52:53 +0100 Subject: [PATCH] mod_push: Fix disabling of notifications Remove the correct field from the c2s state when the client explicitly disables push notifications. This fixes a regression introduced by commit c148ab4430688666d45fb3b3b56d29d67426c1cd. --- src/mod_push.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mod_push.erl b/src/mod_push.erl index d6cbd66d3..b71449696 100644 --- a/src/mod_push.erl +++ b/src/mod_push.erl @@ -458,7 +458,7 @@ c2s_handle_cast(State, {push_enable, ID}) -> {stop, State#{push_enabled => true, push_session_id => ID}}; c2s_handle_cast(State, push_disable) -> - State1 = maps:remove(push_disable, State), + State1 = maps:remove(push_enabled, State), State2 = maps:remove(push_session_id, State1), {stop, State2}; c2s_handle_cast(State, _Msg) ->