Bugfixes coming from trunk (SVN #599):

* src/mod_shared_roster.erl: Bugfix
* src/mod_roster_odbc.erl: Bugfix

SVN Revision: 609
This commit is contained in:
Mickaël Rémond 2006-09-22 07:13:42 +00:00
parent 647acc7768
commit 6bdabb0c3b
3 changed files with 12 additions and 6 deletions

View File

@ -1,3 +1,9 @@
2006-09-05 Alexey Shchepin <alexey@sevcom.net>
* src/mod_shared_roster.erl: Bugfix
* src/mod_roster_odbc.erl: Bugfix
2006-09-03 Mickael Remond <mickael.remond@process-one.net>
* src/odbc/odbc_queries.erl: Support for Microsoft SQL Server as a

View File

@ -141,11 +141,10 @@ get_user_roster(Acc, {LUser, LServer}) ->
R ->
SJID = jlib:jid_to_string(R#roster.jid),
Groups = lists:flatmap(
fun({S, G}) ->
case jlib:jid_tolower(S) of
SJID -> [G];
_ -> []
end
fun({S, G}) when S == SJID ->
[G];
(_) ->
[]
end, JIDGroups),
[R#roster{groups = Groups}]
end

View File

@ -332,7 +332,8 @@ get_user_displayed_groups(US) ->
[Group || Group <- DisplayedGroups1, is_group_enabled(Host, Group)].
is_user_in_group(US, Group, Host) ->
case mnesia:match_object(#sr_user{us=US, group_host={Group, Host}}) of
case catch mnesia:dirty_match_object(
#sr_user{us=US, group_host={Group, Host}}) of
[] -> false;
_ -> true
end.