From 6b9219c5f4b81172edafae31b705fec3ef56b3f6 Mon Sep 17 00:00:00 2001 From: iNPUTmice Date: Wed, 3 Sep 2014 19:35:45 +0200 Subject: added support for password protected muc - fixed #203 and fixed #395 --- src/eu/siacs/conversations/entities/MucOptions.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/eu/siacs/conversations/entities') diff --git a/src/eu/siacs/conversations/entities/MucOptions.java b/src/eu/siacs/conversations/entities/MucOptions.java index 2958965c4..72fbeeabb 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 -- cgit v1.2.3