How to add a user to an existing shared group?

If there’s a shared group already created on the server, how would I add a user to the existing shared group using xiff? So for example, a user registers with the server, and then they add themselves to a shared group. Is this possible? If so, what would the code to add the current user to an existing shared group look like?