powered by Jive Software

Shared Groups

Hey Gato:

I saw the work on shared groups for smack and I like it. The one caveat I see is that I guess you can’‘t have a user in a group that is not a member particularly of the shared group? I noticed this as well that messenger doesn’‘t like it when I attempt to add someone to a shared group. Is there any particular reason why you guys chose to not allow this and does anyone out there have any particularly good ideas on why it should or shouldn’'t be permitted? My only problem with it is that it seems to go against the design of XMPP whereas you have the groups as members of the users and not the other way around, it would seem to me the logical extension of that methodology into the shared groups field as having a shared group be a special kind of member of the user. Sort of like the format I proposed in this thread:




Hey Alex,

The idea of shared groups is that all users have the same information (i.e. contacts) and that the information can only be modified from the server. Therefore, users cannot add or remove users from/to the shared group using their XMPP clients. The only way to alter a shared group is by doing it from the server side.

After checking the XML Schemas in the XMPP specs we found that the suggested modifications were not compliant. Therefore, the only option left was to create a new IQ packet for getting the shared groups of users. Let me know if you think that there is another option that we can consider.


– Gato

Hey Gato,

My idea was not yet to permit the user to add other users to the actual shared groups just to have users in my roster with the same group name as a shared group. Though, I checked and messenger currently doesn’‘t allow this, there are a use case that I could think about where I don’‘t know how messenger behaves but it might create problems. And it is where I alread have a group say called, group, in my roster not shared or anything like that, and then a shared group is created called group, are all the users in my group shared removed or what happens? Perhaps it would be more apt to ask in the messenger forum but it applies in this case because if it doesn’‘t I would have a user listed as being in a shared group who wasn’‘t actualy in a shared group. You’'ll notice to things in the example I supplied here, the one I was hoping to point to when i mentioned the other thread but I see that there was some confusion:


First thing is I did change the namespace: “http://www.jivesoftware.org/jeps/sharedroster”. My desire was merely to follow sort of the layout that was specified in XMPP and to make it sort of mimic the “jabber:iq:roster” with the added element below the roster item of shared, indicating that it was a shared group. The end game is two fold, one to solve the problem I brought up earlier and two to to perhaps make it easier for client developers, because this in fact mimics the layout of the jabber:iq:roster. The way I would envision this being used would be as a substitute for jabber:iq:roster, where if a client knows the namespace it will query the server for it, if the server doesn’'t speak the language of shared groups it will through a not-supported error or what have you so then the client can fall back on jabber:iq:roster. But if it does support it then basicly there is very little a client developer needs to do, at least as far as i can see, to understand and implement shared groups as a substitue for roster. It would still understand and parse all of the normal jabber:iq:roster updates from the server, but the server can know to update the “http://www.jivesoftware.org/jeps/sharedroster” as well in the same manner.

So say for example the shared group cited in my code example above, Developement, gets removed I will get essentially get two updates one from jabber:iq:roster saying that the group was removed and one from “http://www.jivesoftware.org/jeps/sharedroster” saying basicly the same thing.

Hope that explains it a little better though a little verbose.