mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-12 15:57:31 +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,
|
end,
|
||||||
Timestamp = StateData#state.pres_timestamp,
|
Timestamp = StateData#state.pres_timestamp,
|
||||||
Packet1 = xml:append_subtags(
|
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)
|
%% To is the one sending the presence (the target of the probe)
|
||||||
[jlib:timestamp_to_xml(Timestamp, utc, To, ""),
|
[jlib:timestamp_to_xml(Timestamp, utc, To, ""),
|
||||||
%% TODO: Delete the next line once XEP-0091 is Obsolete
|
%% TODO: Delete the next line once XEP-0091 is Obsolete
|
||||||
@ -2855,7 +2856,9 @@ enqueue(StateData, From, To, Packet) ->
|
|||||||
StateData#state{pres_queue = NewQueue}
|
StateData#state{pres_queue = NewQueue}
|
||||||
end;
|
end;
|
||||||
true ->
|
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 =
|
Packet2 =
|
||||||
case CleanPacket of
|
case CleanPacket of
|
||||||
{xmlelement, "message" = Name, Attrs, Els} ->
|
{xmlelement, "message" = Name, Attrs, Els} ->
|
||||||
|
Loading…
Reference in New Issue
Block a user