Hi Sean Voisen,
I’'m wondering if there is a current way to add a contact with a presence request of the type “both”.
I took a look at the Roster class and it did not seem like you have this ability at the moment.
I also noticed this comment in the addContact() method which I think is relevant to what I’'m talking about:
// We can directly add this contact without updating our roster. We also
// need the roster item for changing the subscription type (if requested)
//
// XXX Sean, please review this and remove this comment
It looks like right now you just have it set I automatically like this:
subscription = RosterExtension.SUBSCRIBE_TYPE_TO;
Could we simply add another parameter to the addContact() method that would represent the subscription type? So, then you could do the following:
myRoster.addContact( "homer@springfield.com", “Homer”, “Drinking Buddies”, true, “both” );
It can also still be defaulted to “to”, so that people that don’'t want to specify then it will work the way it does now.
I can implement this and send it along to you if you wish, although if you have another plan for this feature let me know.
Let me know your thoughts on this when you get a chance.
Thanks,
Chris
///
Actually now that I think about it more, maybe you should change the requestSubscription parameter to be a String instead of a Boolean, and you could specify “none”, “to”, or “both” there. The problem with this approach of course, is that it breaks exisitng code that uses the Boolean value.
Message was edited by:
callen