如何获得房间会议ejabberd的StateData

时间:2014-09-05 14:29:21

标签: erlang xmpp ejabberd jabberd2

我想从特定房间获取当前状态数据记录。 我希望有类似......

get_state_data(RoomName)->
   StateData = get_record(Room),
   SateData. 

>get_state_data("someroom").

{state,"8799879","conference.chat.dev.com",
                                            "conference.chat.dev.com",mod_muc_odbc,
                                            {muc,muc_create,muc_admin,
                                             muc_create},
                                            {jid,"8799879",
                                             "conference.chat.dev.com",[],
                                             "8799879",
                                             "conference.chat.dev.com",[]},
                                            {config,"567567","asdfa","asdf",
                                             "sdfa","sdfa","sdf",true,true,
                                             true,anyone,true,true,true,true,
                                             true,true,false,true,false,false,
                                             false,[],true,true,1800,200,
                                             false,
                                             {0,nil}},
                                            {dict,3,16,16,8,80,48,
                                             {[],[],[],[],[],[],[],[],[],[],
                                              [],[],[],[],[],[]},
                                             {{[],[],[],[],[],[],[],[],......

1 个答案:

答案 0 :(得分:0)

我能够通过使用这种方法找到记录

  

[{,{,_},Pid}] = mnesia:dirty_read(muc_online_room,{“8799879”,   “conference.chat.dev.com”})。

     

get_room_state(Room_pid) - >        {ok,R} = gen_fsm:sync_send_all_state_event(Room_pid,get_state),       R上。