JID of a command's caller?

I've added a new command via ejabberd_commands:register_commands and want to access the JID of the calling user inside the command function.

Is this possible? I can't see a way to do this.

Thanks,
Edward

I think I've figured it

I think I've figured it out.

I set the command's 'policy' to 'user' and called the REST API without the X-Admin header. The user/host are then passed to the 'user and 'group' params of my handler function.

Edward

Syndicate content