mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-08 15:42:29 +01:00
Do not add "jabber❌delay" more than once
This commit is contained in:
parent
931866ee33
commit
9f3cdad3f7
@ -1926,7 +1926,8 @@ process_presence_probe(From, To, StateData) ->
|
||||
end,
|
||||
Timestamp = StateData#state.pres_timestamp,
|
||||
Packet1 = xml:append_subtags(
|
||||
Packet,
|
||||
xml:remove_subtags(
|
||||
Packet, "x", {"xmlns", ?NS_DELAY91}),
|
||||
%% To is the one sending the presence (the target of the probe)
|
||||
[jlib:timestamp_to_xml(Timestamp, utc, To, ""),
|
||||
%% TODO: Delete the next line once XEP-0091 is Obsolete
|
||||
@ -2855,7 +2856,9 @@ enqueue(StateData, From, To, Packet) ->
|
||||
StateData#state{pres_queue = NewQueue}
|
||||
end;
|
||||
true ->
|
||||
CleanPacket = xml:remove_subtags(Packet, "x", {"xmlns", ?NS_P1_PUSHED}),
|
||||
CleanPacket = xml:remove_subtags(
|
||||
xml:remove_subtags(Packet, "x", {"xmlns", ?NS_P1_PUSHED}),
|
||||
"x", {"xmlns", ?NS_DELAY91}),
|
||||
Packet2 =
|
||||
case CleanPacket of
|
||||
{xmlelement, "message" = Name, Attrs, Els} ->
|
||||
|
Loading…
Reference in New Issue
Block a user