mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-20 16:15:59 +01:00
Fix Addresses element which lacked others local destinations
When sending single packet, in addresses include all other group destinations, not only oneself
This commit is contained in:
parent
b871fbba1b
commit
5351e8236d
@ -395,7 +395,7 @@ act_groups(FromJID, Packet_stripped, AAttrs, LServiceS,
|
||||
perform(From, Packet, AAttrs, _,
|
||||
{route_single, Group}) ->
|
||||
[route_packet(From, ToUser, Packet, AAttrs,
|
||||
Group#group.addresses)
|
||||
Group#group.others, Group#group.addresses)
|
||||
|| ToUser <- Group#group.dests];
|
||||
perform(From, Packet, AAttrs, _,
|
||||
{{route_multicast, JID, RLimits}, Group}) ->
|
||||
@ -634,13 +634,13 @@ decide_action_group(Group) ->
|
||||
%%% Route packet
|
||||
%%%-------------------------
|
||||
|
||||
route_packet(From, ToDest, Packet, AAttrs, Addresses) ->
|
||||
route_packet(From, ToDest, Packet, AAttrs, Others, Addresses) ->
|
||||
Dests = case ToDest#dest.type of
|
||||
<<"bcc">> -> [];
|
||||
_ -> [ToDest]
|
||||
end,
|
||||
route_packet2(From, ToDest#dest.jid_string, Dests,
|
||||
Packet, AAttrs, Addresses).
|
||||
Packet, AAttrs, {Others, Addresses}).
|
||||
|
||||
route_packet_multicast(From, ToS, Packet, AAttrs, Dests,
|
||||
Addresses, Limits) ->
|
||||
@ -666,6 +666,8 @@ route_packet2(From, ToS, Dests, Packet, AAttrs,
|
||||
ToJID = stj(ToS),
|
||||
ejabberd_router:route(From, ToJID, Packet2).
|
||||
|
||||
append_dests(_Dests, {Others, Addresses}) ->
|
||||
Addresses++Others;
|
||||
append_dests([], Addresses) -> Addresses;
|
||||
append_dests([Dest | Dests], Addresses) ->
|
||||
append_dests(Dests, [Dest#dest.full_xml | Addresses]).
|
||||
@ -912,8 +914,9 @@ received_awaiter(JID, Waiter, LServiceS) ->
|
||||
From = Waiter#waiter.sender,
|
||||
Packet = Waiter#waiter.packet,
|
||||
AAttrs = Waiter#waiter.aattrs,
|
||||
Others = Group#group.others,
|
||||
Addresses = Waiter#waiter.addresses,
|
||||
[route_packet(From, ToUser, Packet, AAttrs, Addresses)
|
||||
[route_packet(From, ToUser, Packet, AAttrs, Others, Addresses)
|
||||
|| ToUser <- Group#group.dests];
|
||||
true ->
|
||||
send_query_info(RServer, LServiceS),
|
||||
|
Loading…
Reference in New Issue
Block a user