[ejabberd] getting nickname by bare-jid from another module

Stephan Maihöfer sma at turtle-entertainment.de
Wed Oct 13 13:23:07 MSD 2010

hi there,

i am currently writing a module that takes some piece of
data by HTTP and needs to send presence information on
behalf of a user to a MUC room. this is needed for some
status-information update that occurs between out website
and the xmpp infrastructure. it all runs pretty well already,
the only problem i have now is that it seems to me that i
need to know the nickname of the user in the room to send
a message on behalf of that user.

this is basically impossible since we dont know the nickname
of the users _in the room_ on our website backend. is there
a way to get a list of bare-jids of a room and their nickname
or something like that?

i am playing around with these at the moment but without
real success:

	mnesia:dirty_read(muc_room, {Name, Host})
	mnesia:dirty_read(muc_online_room, {Name, Host})

i also thought about sending a disco packet internally. but this will
only give me the items in the room and i would still not have
the link to the jids.

any clever way of getting the nickname of a user in a room by (bare) jid
from "inside" ejabberd?

thanks in advance!


More information about the ejabberd mailing list