mirror of
https://github.com/processone/ejabberd.git
synced 2024-07-21 00:19:53 +02:00
Disable notifications for a user on "Invalid token" error
This commit is contained in:
parent
c86e4faba3
commit
f2cfee11de
|
@ -199,14 +199,19 @@ handle_info({ssl, Socket, Packet}, State)
|
||||||
case dict:find(CmdID, State#state.cmd_cache) of
|
case dict:find(CmdID, State#state.cmd_cache) of
|
||||||
{ok, {JID, _DeviceID}} ->
|
{ok, {JID, _DeviceID}} ->
|
||||||
?ERROR_MSG("PUSH ERROR for ~p: ~p", [JID, Status]),
|
?ERROR_MSG("PUSH ERROR for ~p: ~p", [JID, Status]),
|
||||||
%From = jlib:make_jid("", State#state.host, ""),
|
if
|
||||||
%ejabberd_router:route(
|
Status == 8 ->
|
||||||
% From, JID,
|
From = jlib:make_jid("", State#state.host, ""),
|
||||||
% {xmlelement, "message", [],
|
ejabberd_router:route(
|
||||||
% [{xmlelement, "disable",
|
From, JID,
|
||||||
% [{"xmlns", ?NS_P1_PUSH},
|
{xmlelement, "message", [],
|
||||||
% {"status", integer_to_list(Status)}],
|
[{xmlelement, "disable",
|
||||||
% []}]});
|
[{"xmlns", ?NS_P1_PUSH},
|
||||||
|
{"status", integer_to_list(Status)}],
|
||||||
|
[]}]});
|
||||||
|
true ->
|
||||||
|
ok
|
||||||
|
end,
|
||||||
ok;
|
ok;
|
||||||
error ->
|
error ->
|
||||||
?ERROR_MSG("Unknown cmd ID ~p~n", [CmdID]),
|
?ERROR_MSG("Unknown cmd ID ~p~n", [CmdID]),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user