Automatically Add Anonymous Users to Roster

Is there a way to have anonymous users on the server automatically added to the roster of my main account when they login to the server?

If there isn’t any built-in way with Openfire, would there be a way to do it myself? I’m working on a web client using BOSH to my server. I wanted to utilize anonymous logins. However, I would like to be able to see anonymous users right away in my roster when they login. My client is JavaScript based. I was thinking about ways to do it and I was thinking about trying to add the user to the roster of my main account after they login. Like, send a jabber:iq:roster IQ packet that adds the currently logged-in anonymous user to the roster. Would that work? Maybe also remove the user on logout.

Of course a solution built into Openfire would be most ideal but I’m willing to try anything to make it work. Thanks