Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- отправляемые пользователю recv исх
- user_receive_packet(Acc, #jid{lserver = LServer}, From, _To,Packet = #xmlel{name = <<"iq">>}) ->
- Query=exml_query:path(Packet, [{element_with_ns, <<"query">>,<<"urn:xmpp:muclight:0#affiliations">>}]),
- case Query of
- undefined-> Acc;
- _->
- %io:format("user_receive_packet ~p ~p~n",[Packet,Query]),
- Acc
- end
- ;
- user_receive_packet(Acc, _Jid, _From, _To,_Packet) ->
- Acc.
- отправляет пользователь send вход
- -spec user_send_packet(mongoose_acc:t(), From :: jid:jid(), To :: jid:jid(),
- Packet :: exml:element()) -> mongoose_acc:t().
- user_send_packet(Acc, From, To, Packet = #xmlel{name = <<"iq">>}) ->
- io:format("user_send_packet ~p ~n",[Packet]),
- Acc;
- user_send_packet(Acc, _From, _To, _Packet) ->
- Acc.
- ejabberd_hooks:add(user_receive_packet, Host, ?MODULE, user_receive_packet, 500),
- ejabberd_hooks:add(user_send_packet, Host, ?MODULE, user_send_packet, 500),
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement