mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-22 16:20:52 +01:00
* src/ejabberd_c2s.erl: Support for filtering of incoming messages
and IQs, presence filtering will be after some xmpp-im clarifications SVN Revision: 132
This commit is contained in:
parent
05183f5628
commit
141e99aaa9
@ -1,3 +1,9 @@
|
|||||||
|
2003-08-18 Alexey Shchepin <alexey@sevcom.net>
|
||||||
|
|
||||||
|
* src/ejabberd_c2s.erl: Support for filtering of incoming messages
|
||||||
|
and IQs, presence filtering will be after some xmpp-im
|
||||||
|
clarifications
|
||||||
|
|
||||||
2003-08-15 Alexey Shchepin <alexey@sevcom.net>
|
2003-08-15 Alexey Shchepin <alexey@sevcom.net>
|
||||||
|
|
||||||
* src/mod_muc/mod_muc.erl: Fixed handling of room names with
|
* src/mod_muc/mod_muc.erl: Fixed handling of room names with
|
||||||
|
@ -36,3 +36,6 @@
|
|||||||
-define(CONFIG_PATH, "ejabberd.cfg").
|
-define(CONFIG_PATH, "ejabberd.cfg").
|
||||||
-define(LOG_PATH, "ejabberd.log").
|
-define(LOG_PATH, "ejabberd.log").
|
||||||
|
|
||||||
|
|
||||||
|
-define(PRIVACY_SUPPORT, true).
|
||||||
|
|
||||||
|
@ -624,12 +624,42 @@ handle_info({route, From, To, Packet}, StateName, StateData) ->
|
|||||||
From,
|
From,
|
||||||
jlib:iq_to_xml(ResIQ)),
|
jlib:iq_to_xml(ResIQ)),
|
||||||
{false, Attrs, StateData};
|
{false, Attrs, StateData};
|
||||||
%{iq, ID, Type, ?NS_VCARD, SubEl} ->
|
%-ifdef(PRIVACY_SUPPORT).
|
||||||
% TODO: don't pass packets until roster loaded
|
{iq, _ID, Type, _XMLNS, _SubEl} ->
|
||||||
%{true, Attrs, StateData};
|
case catch mod_privacy:check_packet(
|
||||||
|
StateData#state.user,
|
||||||
|
StateData#state.privacy_list,
|
||||||
|
{From, To, Packet},
|
||||||
|
in) of
|
||||||
|
{'EXIT', _Reason} ->
|
||||||
|
{true, Attrs, StateData};
|
||||||
|
allow ->
|
||||||
|
{true, Attrs, StateData};
|
||||||
|
deny ->
|
||||||
|
Err = jlib:make_error_reply(
|
||||||
|
Packet, ?ERR_FEATURE_NOT_IMPLEMENTED),
|
||||||
|
ejabberd_router:route(To, From, Err),
|
||||||
|
{false, Attrs, StateData}
|
||||||
|
end;
|
||||||
|
%-endif.
|
||||||
_ ->
|
_ ->
|
||||||
{true, Attrs, StateData}
|
{true, Attrs, StateData}
|
||||||
end;
|
end;
|
||||||
|
%-ifdef(PRIVACY_SUPPORT).
|
||||||
|
"message" ->
|
||||||
|
case catch mod_privacy:check_packet(
|
||||||
|
StateData#state.user,
|
||||||
|
StateData#state.privacy_list,
|
||||||
|
{From, To, Packet},
|
||||||
|
in) of
|
||||||
|
{'EXIT', _Reason} ->
|
||||||
|
{true, Attrs, StateData};
|
||||||
|
allow ->
|
||||||
|
{true, Attrs, StateData};
|
||||||
|
deny ->
|
||||||
|
{false, Attrs, StateData}
|
||||||
|
end;
|
||||||
|
%-endif.
|
||||||
_ ->
|
_ ->
|
||||||
{true, Attrs, StateData}
|
{true, Attrs, StateData}
|
||||||
end,
|
end,
|
||||||
|
@ -192,7 +192,6 @@ do_route(From, To, Packet) ->
|
|||||||
{xmlelement, Name, Attrs, Els} = Packet,
|
{xmlelement, Name, Attrs, Els} = Packet,
|
||||||
case Resource of
|
case Resource of
|
||||||
"" ->
|
"" ->
|
||||||
% TODO
|
|
||||||
case Name of
|
case Name of
|
||||||
"presence" ->
|
"presence" ->
|
||||||
{FU, FS, FR} = From,
|
{FU, FS, FR} = From,
|
||||||
|
Loading…
Reference in New Issue
Block a user