25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-12 15:57:31 +01:00

Do not add "jabberdelay" more than once

This commit is contained in:
Evgeniy Khramtsov 2010-10-27 21:05:19 +10:00 committed by Alexey Shchepin
parent 931866ee33
commit 9f3cdad3f7

View File

@ -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} ->