diff --git a/source/org/jivesoftware/smack/Roster.java b/source/org/jivesoftware/smack/Roster.java index ec4893a21..f035b3d9c 100644 --- a/source/org/jivesoftware/smack/Roster.java +++ b/source/org/jivesoftware/smack/Roster.java @@ -65,7 +65,7 @@ import java.util.*; * Others users may attempt to subscribe to this user using a subscription request. Three * modes are supported for handling these requests:
+ * The default subscription mode is {@link #SUBSCRIPTION_ACCEPT_ALL}.
* * If using the manual mode, a PacketListener should be registered that * listens for Presence packets that have a type of {@link Presence.Type#SUBSCRIBE}. @@ -145,7 +145,7 @@ public class Roster { /** * Sets the subscription processing mode, which dictates what action * Smack will take when subscription requests from other users are made. - * The default subscription mode is {@link #SUBCRIPTION_ACCEPT_ALL}.
+ * The default subscription mode is {@link #SUBSCRIPTION_ACCEPT_ALL}.
* * If using the manual mode, a PacketListener should be registered that * listens for Presence packets that have a type of {@link Presence.Type#SUBSCRIBE}. @@ -153,8 +153,8 @@ public class Roster { * @param subscriptionMode the subscription mode. */ public void setSubscriptionMode(int subscriptionMode) { - if (subscriptionMode != SUBCRIPTION_ACCEPT_ALL && - subscriptionMode != SUBCRIPTION_REJECT_ALL && + if (subscriptionMode != SUBSCRIPTION_ACCEPT_ALL && + subscriptionMode != SUBSCRIPTION_REJECT_ALL && subscriptionMode != SUBSCRIPTION_MANUAL) { throw new IllegalArgumentException("Invalid mode."); @@ -511,13 +511,13 @@ public class Roster { } } else if (presence.getType() == Presence.Type.SUBSCRIBE) { - if (subscriptionMode == SUBCRIPTION_ACCEPT_ALL) { + if (subscriptionMode == SUBSCRIPTION_ACCEPT_ALL) { // Accept all subscription requests. Presence response = new Presence(Presence.Type.SUBSCRIBED); response.setTo(presence.getFrom()); connection.sendPacket(response); } - else if (subscriptionMode == SUBCRIPTION_REJECT_ALL) { + else if (subscriptionMode == SUBSCRIPTION_REJECT_ALL) { // Reject all subscription requests. Presence response = new Presence(Presence.Type.UNSUBSCRIBED); response.setTo(presence.getFrom());