parent
25abf8b634
commit
de49e7631f
|
@ -234,10 +234,11 @@ process_unblock(#iq{from = From} = IQ, LJIDs) ->
|
|||
|
||||
-spec broadcast_event(jid(), block() | unblock()) -> ok.
|
||||
broadcast_event(#jid{luser = LUser, lserver = LServer} = From, Event) ->
|
||||
BFrom = jid:remove_resource(From),
|
||||
lists:foreach(
|
||||
fun(R) ->
|
||||
To = jid:replace_resource(From, R),
|
||||
IQ = #iq{type = set, from = From, to = To,
|
||||
IQ = #iq{type = set, from = BFrom, to = To,
|
||||
id = <<"push", (randoms:get_string())/binary>>,
|
||||
sub_els = [Event]},
|
||||
ejabberd_router:route(IQ)
|
||||
|
|
Loading…
Reference in New Issue