I have already a very simple website with a quite good amount of trafic.
So I decided to add a web chat on with, to let my users chat among their friendship. I have decided to use ejabberd to complete this task. The problem is: I have already 2 table ( users[uid, nickname, pass], and relationships[rid, uid, uid2]. How can I tell to ejabber to work with the data inside these tables? Can I find any module, like the auth's one, to edit and to adapt for my purpose?
EDIT
If I don't want to use rosterusers table, but directly my elationships[rid, uid, uid2], have you any advice on what should I change?
1) first of all, inside odbc_queries, the query inside the function get_roster to
"select uid, uid2 from relationships "
"where uid ='", Username, "'"]).
2) the "tuple columns's checker" inside mod_roster_dbc the function get_roster
3) then the function raw_to_record to something like
raw_to_record(LServer, {Uid,Uid2}) ->
case jlib:make_jid(Uid2, LServer, "") of
error ->
error;
JID ->
LJID = jlib:jid_tolower(JID),
Subscription = both,
Ask = both,
end,
#roster{usj = {Uid, LServer, LJID},
us = {Uid, LServer},
jid = LJID,
name = "",
subscription = Subscription,
ask = Ask,
askmessage = ""}
end.
Then?