diff options
author | Alexey Shchepin <alexey@process-one.net> | 2005-10-29 20:14:39 +0000 |
---|---|---|
committer | Alexey Shchepin <alexey@process-one.net> | 2005-10-29 20:14:39 +0000 |
commit | a8f5d4cd3d01057c4d1f1d74a25da84ce14800e5 (patch) | |
tree | 62be0dec7933ca247da294a59811f8ca3a416f4e /src | |
parent | * src/tls/tls.erl: Accept {error,already_loaded} from (diff) |
* src/mod_roster_odbc.erl: Bugfix
SVN Revision: 428
Diffstat (limited to 'src')
-rw-r--r-- | src/mod_roster_odbc.erl | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/mod_roster_odbc.erl b/src/mod_roster_odbc.erl index 75b58e8b6..36d477d52 100644 --- a/src/mod_roster_odbc.erl +++ b/src/mod_roster_odbc.erl @@ -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} |