diff options
author | Michael <betheg@bitcloner.org> | 2014-11-20 21:31:29 +0100 |
---|---|---|
committer | Michael <betheg@bitcloner.org> | 2014-11-20 21:37:56 +0100 |
commit | 3e3767cb0604360a8997cd3a4dbaa8da37cf2821 (patch) | |
tree | 213f02401df4c8da60cdc89d9549f8a8022610b6 /src/main/java/eu | |
parent | a2072408818602353cc6e76fa673fc1b1a6860d3 (diff) |
change status codes string 'number' to a better readable constant.
Diffstat (limited to 'src/main/java/eu')
-rw-r--r-- | src/main/java/eu/siacs/conversations/entities/MucOptions.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/main/java/eu/siacs/conversations/entities/MucOptions.java b/src/main/java/eu/siacs/conversations/entities/MucOptions.java index 2655fc44f..df3c39a9d 100644 --- a/src/main/java/eu/siacs/conversations/entities/MucOptions.java +++ b/src/main/java/eu/siacs/conversations/entities/MucOptions.java @@ -24,7 +24,9 @@ public class MucOptions { public static final int KICKED_FROM_ROOM = 9; + public static final String STATUS_CODE_SELF_PRESENCE = "110"; public static final String STATUS_CODE_BANNED = "301"; + public static final String STATUS_CODE_CHANGED_NICK = "303"; public static final String STATUS_CODE_KICKED = "307"; private interface OnEventListener { @@ -178,7 +180,7 @@ public class MucOptions { user.setAffiliation(item.getAttribute("affiliation")); user.setRole(item.getAttribute("role")); user.setJid(item.getAttributeAsJid("jid")); - if (codes.contains("110")) { + if (codes.contains(STATUS_CODE_SELF_PRESENCE)) { this.isOnline = true; this.error = ERROR_NO_ERROR; self = user; @@ -208,8 +210,8 @@ public class MucOptions { } } } - } else if (type.equals("unavailable") && codes.contains("110")) { - if (codes.contains("303")) { + } else if (type.equals("unavailable") && codes.contains(STATUS_CODE_SELF_PRESENCE)) { + if (codes.contains(STATUS_CODE_CHANGED_NICK)) { this.mNickChangingInProgress = true; } else if (codes.contains(STATUS_CODE_KICKED)) { setError(KICKED_FROM_ROOM); |