0

I want to get the current state data record from a particular room. I would like to have something like...

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,
                                             {[],[],[],[],[],[],[],[],[],[],
                                              [],[],[],[],[],[]},
                                             {{[],[],[],[],[],[],[],[],......
JohnnyHK
  • 305,182
  • 66
  • 621
  • 471
user1000622
  • 519
  • 1
  • 7
  • 18

1 Answers1

0

I was able to find the record by using this methods

[{,{,_},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.

user1000622
  • 519
  • 1
  • 7
  • 18