how can I get StateData and replace this value in mod_muc_room

hi!
I need to change StateData of the room in mod_muc_room.erl from ejabberd_c2s.erl.
I mean I have to change StateData of each room this user is connected if he changes his presence,for example.

so, in file mod_muc_room.erl I have a function, that receives all information from ejabberd_c2s.erl.

room_state() ->
receive
Msg -> (any data from ejabberd_c2s.erl about user, his presence or even PID),
room_state()
end.

so room knows that user changed his presence and it should change it's own StateData, but how can I get this value, modify and inject(replace) it to this room?

problem solved on a

Syndicate content