mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +01:00
Fix previous commit to pass all tests
This commit is contained in:
parent
0de6f1c538
commit
a07029dcad
@ -217,12 +217,12 @@ update_to_in_wrapped(Packet, To) ->
|
|||||||
} = PSItems
|
} = PSItems
|
||||||
} = PSEvent]} ->
|
} = PSEvent]} ->
|
||||||
Internal2 = xmpp:set_to(Internal, To),
|
Internal2 = xmpp:set_to(Internal, To),
|
||||||
PSItem2 = PSItem#ps_item{sub_els = Internal2},
|
PSItem2 = PSItem#ps_item{sub_els = [Internal2]},
|
||||||
PSItems2 = PSItems#ps_items{items = PSItem2},
|
PSItems2 = PSItems#ps_items{items = [PSItem2]},
|
||||||
PSEvent2 = PSEvent#ps_event{items = PSItems2},
|
PSEvent2 = PSEvent#ps_event{items = PSItems2},
|
||||||
Packet#message{sub_els = [PSEvent2]};
|
xmpp:set_to(Packet#message{sub_els = [PSEvent2]}, To);
|
||||||
_ ->
|
_ ->
|
||||||
Packet
|
xmpp:set_to(Packet, To)
|
||||||
end.
|
end.
|
||||||
|
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
|
@ -4626,7 +4626,7 @@ store_room_no_checks(StateData, ChangesHints) ->
|
|||||||
send_subscriptions_change_notifications(From, Nick, Type, State) ->
|
send_subscriptions_change_notifications(From, Nick, Type, State) ->
|
||||||
{WJ, WN} =
|
{WJ, WN} =
|
||||||
maps:fold(
|
maps:fold(
|
||||||
fun({WithJid, WithNick} = Res, #subscriber{nodes = Nodes, jid = JID}, _) ->
|
fun(_, #subscriber{nodes = Nodes, jid = JID}, {WithJid, WithNick} = Res) ->
|
||||||
case lists:member(?NS_MUCSUB_NODES_SUBSCRIBERS, Nodes) of
|
case lists:member(?NS_MUCSUB_NODES_SUBSCRIBERS, Nodes) of
|
||||||
true ->
|
true ->
|
||||||
case (State#state.config)#config.anonymous == false orelse
|
case (State#state.config)#config.anonymous == false orelse
|
||||||
@ -4640,7 +4640,7 @@ send_subscriptions_change_notifications(From, Nick, Type, State) ->
|
|||||||
false ->
|
false ->
|
||||||
Res
|
Res
|
||||||
end
|
end
|
||||||
end, ok, State#state.subscribers),
|
end, {[], []}, State#state.subscribers),
|
||||||
if WJ /= [] ->
|
if WJ /= [] ->
|
||||||
Payload1 = case Type of
|
Payload1 = case Type of
|
||||||
subscribe -> #muc_subscribe{jid = From, nick = Nick};
|
subscribe -> #muc_subscribe{jid = From, nick = Nick};
|
||||||
@ -4779,7 +4779,7 @@ send_wrapped_multiple(From, Users, Packet, Node, State) ->
|
|||||||
not lists:member(303, Codes)) of
|
not lists:member(303, Codes)) of
|
||||||
true ->
|
true ->
|
||||||
ejabberd_router_multicast:route_multicast(
|
ejabberd_router_multicast:route_multicast(
|
||||||
State#state.jid, State#state.server_host, Dir,
|
From, State#state.server_host, Dir,
|
||||||
#presence{id = p1_rand:get_string(),
|
#presence{id = p1_rand:get_string(),
|
||||||
type = unavailable}, false);
|
type = unavailable}, false);
|
||||||
false ->
|
false ->
|
||||||
@ -4791,7 +4791,7 @@ send_wrapped_multiple(From, Users, Packet, Node, State) ->
|
|||||||
_ ->
|
_ ->
|
||||||
ok
|
ok
|
||||||
end,
|
end,
|
||||||
ejabberd_router_multicast:route_multicast(State#state.jid, State#state.server_host,
|
ejabberd_router_multicast:route_multicast(From, State#state.server_host,
|
||||||
Dir, Packet, false)
|
Dir, Packet, false)
|
||||||
end,
|
end,
|
||||||
case Wra of
|
case Wra of
|
||||||
@ -4804,7 +4804,7 @@ send_wrapped_multiple(From, Users, Packet, Node, State) ->
|
|||||||
_ ->
|
_ ->
|
||||||
p1_rand:get_string()
|
p1_rand:get_string()
|
||||||
end,
|
end,
|
||||||
NewPacket = wrap(From, State#state.jid, Packet, Node, Id),
|
NewPacket = wrap(From, undefined, Packet, Node, Id),
|
||||||
NewPacket2 = xmpp:put_meta(NewPacket, in_muc_mam, MamEnabled),
|
NewPacket2 = xmpp:put_meta(NewPacket, in_muc_mam, MamEnabled),
|
||||||
ejabberd_router_multicast:route_multicast(State#state.jid, State#state.server_host,
|
ejabberd_router_multicast:route_multicast(State#state.jid, State#state.server_host,
|
||||||
Wra, NewPacket2, true)
|
Wra, NewPacket2, true)
|
||||||
|
Loading…
Reference in New Issue
Block a user