[ejabberd] send_all_state_event to mod_muc_room gen_fsm

Badlop badlop at gmail.com
Thu May 19 13:47:51 MSD 2011


2011/5/18 Boris Okner <boris.okner at gmail.com>:
> You should retrieve fsm's Pid from muc_online_room table. The table has
> {room_name, host} key and stores Pid of the room in pid field.

Right, and there's example code for this in mod_muc_admin.erl (in
ejabberd-modules SVN):
get_room_pid(Name, Service) ->
    case mnesia:dirty_read(muc_online_room, {Name, Service}) of
        [] ->
            room_not_found;
        [Room] ->
            Room#muc_online_room.pid
    end.


---
Badlop
ProcessOne


More information about the ejabberd mailing list