I wanna add a possibility to ejabberd-2.1.12 to be invisible in MUC via presence "invisible" (I know that in 3.x.x versions of ejabberd this will be deprecated, - I'll do that for site via http-bind).
so the task is: send non-directed presence "invisible" and in every room user connected change it's StateData.
so I modified ejabberd_c2s.erl and when user changes his non-directed presence, he sends to mod_muc_room.erl notification
function mod_muc_room.erl :
room_state() ->
receive
Msg -> (any data about user, presence),
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?