There seems to be a bit of an issue with the Roster defaulting to SUBSCRIPTION_ACCEPT_ALL if you are writing a program that must manually handle subscriptions. Let me explain:
- If you are offline and another user sends you a subscription request, as soon as you login using Smack that subscription is accepted…even if you set the subscription mode to manual right after login. This appears to be a result of the Roster defaulting to SUBSCRIPTION_ACCEPT_ALL.
Here is the code I’'m using to isolate & test this:
public class TestLogin
XMPPConnection con = new XMPPConnection(“myserver”);
Roster roster = con.getRoster();
public static void main(String args)
TestLogin testLogin = new TestLogin();
Has anyone else experienced this or is there something else I should be doing? My current solution is that I’'ll just rebuild smack.jar with a Roster that defaults to SUBSCRIPTION_MANUAL.