25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-22 16:20:52 +01:00

* src/mod_privacy.erl: Temporary workaround to inconsistency

* src/mod_privacy_odbc.erl: Likewise

SVN Revision: 1975
This commit is contained in:
Badlop 2009-03-07 08:53:34 +00:00
parent cf4b7b36ee
commit d6820f2c2d
3 changed files with 15 additions and 36 deletions

View File

@ -1,3 +1,8 @@
2009-03-07 Badlop <badlop@process-one.net>
* src/mod_privacy.erl: Temporary workaround to inconsistency
* src/mod_privacy_odbc.erl: Likewise
2009-03-06 Badlop <badlop@process-one.net>
* src/eldap/eldap.erl: moves waiting for response queries to

View File

@ -655,27 +655,14 @@ is_ptype_match(Item, PType) ->
end.
%% TODO: Investigate this: sometimes Value has binaries, other times has strings
is_type_match(Type, Value, JID, Subscription, Groups) ->
case Type of
jid ->
case Value of
{undefined, Server, undefined} ->
case JID of
{_, Server, _} ->
true;
_ ->
false
end;
{User, Server, undefined} ->
case JID of
{User, Server, _} ->
true;
_ ->
false
end;
_ ->
Value == JID
end;
{User, Server, Resource} = Value,
((User == undefined) orelse (User == []) orelse (User == exmpp_jid:lnode(JID)))
andalso ((Server == undefined) orelse (Server == []) orelse (Server == exmpp_jid:ldomain(JID)))
andalso ((Resource == undefined) orelse (Resource == []) orelse (Resource == exmpp_jid:lresource(JID)));
subscription ->
Value == Subscription;
group ->

View File

@ -654,27 +654,14 @@ is_ptype_match(Item, PType) ->
end.
%% TODO: Investigate this: sometimes Value has binaries, other times has strings
is_type_match(Type, Value, JID, Subscription, Groups) ->
case Type of
jid ->
case Value of
{undefined, Server, undefined} ->
case JID of
{_, Server, _} ->
true;
_ ->
false
end;
{User, Server, undefined} ->
case JID of
{User, Server, _} ->
true;
_ ->
false
end;
_ ->
Value == JID
end;
{User, Server, Resource} = Value,
((User == undefined) orelse (User == []) orelse (User == exmpp_jid:lnode(JID)))
andalso ((Server == undefined) orelse (Server == []) orelse (Server == exmpp_jid:ldomain(JID)))
andalso ((Resource == undefined) orelse (Resource == []) orelse (Resource == exmpp_jid:lresource(JID)));
subscription ->
Value == Subscription;
group ->