25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-26 16:26:24 +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> 2009-03-06 Badlop <badlop@process-one.net>
* src/eldap/eldap.erl: moves waiting for response queries to * src/eldap/eldap.erl: moves waiting for response queries to

View File

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

View File

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