diff options
author | iNPUTmice <daniel@gultsch.de> | 2014-09-03 19:35:45 +0200 |
---|---|---|
committer | iNPUTmice <daniel@gultsch.de> | 2014-09-03 19:35:45 +0200 |
commit | 6b9219c5f4b81172edafae31b705fec3ef56b3f6 (patch) | |
tree | 0eda281b2827ae8466e9e0c2036fcec4b2630187 /src/eu/siacs/conversations/entities/MucOptions.java | |
parent | f19b1fb823db4fe1d132acc57f6dc7c368374644 (diff) |
added support for password protected muc - fixed #203 and fixed #395
Diffstat (limited to 'src/eu/siacs/conversations/entities/MucOptions.java')
-rw-r--r-- | src/eu/siacs/conversations/entities/MucOptions.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/eu/siacs/conversations/entities/MucOptions.java b/src/eu/siacs/conversations/entities/MucOptions.java index 2958965c..72fbeeab 100644 --- a/src/eu/siacs/conversations/entities/MucOptions.java +++ b/src/eu/siacs/conversations/entities/MucOptions.java @@ -14,6 +14,7 @@ public class MucOptions { public static final int ERROR_NO_ERROR = 0; public static final int ERROR_NICK_IN_USE = 1; public static final int ERROR_ROOM_NOT_FOUND = 2; + public static final int ERROR_PASSWORD_REQUIRED = 3; public interface OnRenameListener { public void onRename(boolean success); @@ -106,6 +107,7 @@ public class MucOptions { private User self = new User(); private String subject = null; private String joinnick; + private String password = null; public MucOptions(Account account) { this.account = account; @@ -186,6 +188,8 @@ public class MucOptions { } else { this.error = ERROR_NICK_IN_USE; } + } else if (error.hasChild("not-authorized")) { + this.error = ERROR_PASSWORD_REQUIRED; } } } @@ -308,4 +312,12 @@ public class MucOptions { } return null; } + + public String getPassword() { + return this.password; + } + + public void setPassword(String password) { + this.password = password; + } }
\ No newline at end of file |