25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-22 17:28:25 +01:00

* src/mod_roster_odbc.erl: Bugfix

SVN Revision: 428
This commit is contained in:
Alexey Shchepin 2005-10-29 20:14:39 +00:00
parent 144f9f09e7
commit a8f5d4cd3d
2 changed files with 16 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2005-10-29 Alexey Shchepin <alexey@sevcom.net>
* src/mod_roster_odbc.erl: Bugfix
2005-10-25 Alexey Shchepin <alexey@sevcom.net>
* src/tls/tls.erl: Accept {error,already_loaded} from

View File

@ -468,7 +468,18 @@ process_subscription(Direction, User, Server, JID1, Type) ->
{selected, ["username", "jid", "nick", "subscription", "ask",
"server", "subscribe", "type"],
[I]} ->
raw_to_record(I);
R = raw_to_record(I),
Groups = case catch ejabberd_odbc:sql_query(
LServer,
["select grp from rostergroups "
"where username='", Username, "' "
"and jid='", SJID, "'"]) of
{selected, ["grp"], JGrps} when is_list(JGrps) ->
[JGrp || {JGrp} <- JGrps];
_ ->
[]
end,
R#roster{groups = Groups};
_ ->
#roster{user = LUser,
jid = LJID}