powered by Jive Software

Adding Users to a Group

I have just installed Jive Messenger 2.1 and had a look at the new Group feature. This is just what I want to enable groups of Users to see each other without having to add every other User to every Roster.

How do I add a User to a Group using the Smack API?

I can do it using the Web Admin.

There’‘s not a way to add a user to a group using Smack. This is because Messenger’‘s concept of a group isn’‘t a part of XMPP. It’'s possible that we could expose this through ad-hoc commands at some point in the future, though.

Regards,

Matt

Maybe I could have some advice then. What I am trying to do is integrate an IM system (based on Messenger and Smack) with a bespoke trading system. When a new User is registered on the trading system, I want to also register that user on Jive Messenger and have it so that all other Users are automatically in its Roster. Groups seemed like a really good way to achieve this. However, given that I cannot use Smack, the two options I can thing of are:

  1. Have my application INSERT into the Messenger database directly. (In am using MySQL.)

or,

  1. Have my application log on to Messenger as the new User and add every other User in my application’‘s database to the new User’'s Roster.

Which method would be preferred? Or is there a better way?

Regards,

Simon.

Simon,

Trying to keep user accounts and groups in synch across two systems is always a pain. We don’'t particularly like that model, which is why we made authentication, users, and groups in Jive Messenger totally pluggable. By implementing the AuthProvider, UserProvider, and GroupProvider interfaces, you can talk directly to your external auth/user/group systems without doing any data copying.

I’'d suggest looking at doing this.

Regards,

Matt