I am looking for an easy way to access a users StateData by using their JID/Server/Resource information.
Is their an easy way of accessing this data? Ive poked around in ejabberd_sm.erl but haven't found an easy way of accessing it.
Can anyone point me in the right direction or give me pointers?
What StateData do you refer
What StateData do you refer to exactly? I guess you are interested in the one implemented in ejabberd_c2s.erl:
What information are you interested in, IP address, method of connection...?
Thanks for your input, i was
Thanks for your input, i was able to find what i needed through support on the process-one forum.
Link:http://www.process-one.net/en/forum/viewthread/79/
Jeffrey R. | dS
If I'm understanding you
If I'm understanding you correctly, this is almost the same thing that I needed while hackingmy PEP patch . Thus I added
ejabberd_sm:get_session_pid/3
, which returns the PID of theejabberd_c2s
process, and thenejabberd_c2s:get_subscribed_and_online/1
, which returns the data that I need. These functions may or may not eventually find their way into ejabberd proper in this shape, but I hope the code might serve as inspiration…