]> granicus.if.org Git - ejabberd/commitdiff
Use ejabberd_router:route/3 directly, instead of send_packet_to/3
authorMaxim Ignatenko <gelraen.ua@gmail.com>
Sun, 24 Jul 2011 12:06:12 +0000 (15:06 +0300)
committerMaxim Ignatenko <gelraen.ua@gmail.com>
Mon, 26 Sep 2011 08:16:27 +0000 (11:16 +0300)
src/mod_muc/mod_muc_room.erl

index 16b8de8412809fed0268469091d3b0ed478f391f..b1ecc1af4e0471de2df78a37dbc74e01f7f88b61 100644 (file)
@@ -3702,15 +3702,14 @@ send_voice_request(From, StateData) ->
                ?DICT:to_list(StateData#state.users)),
        ?ERROR_MSG("MUC ROOM: send_voice_request: FromNick = ~p~n", [FromNick]),
        lists:map(
-               fun({_, User}) -> send_packet_to(
-                       prepare_request_form(From, FromNick, ""),
-                       User#user.jid, StateData)
+               fun({_, User}) ->
+                       ejabberd_router:route(
+                               StateData#state.jid,
+                               User#user.jid,
+                               prepare_request_form(From, FromNick, ""))
                end, Moderators),
        ok.
 
-send_packet_to(Packet, To, StateData) ->
-       ejabberd_router:route(StateData#state.jid, To, Packet).
-
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 % Invitation support