diff options
4 files changed, 7 insertions, 0 deletions
diff --git a/src/main/java/de/pixart/messenger/entities/MucOptions.java b/src/main/java/de/pixart/messenger/entities/MucOptions.java index 27b318f0c..47ca622fc 100644 --- a/src/main/java/de/pixart/messenger/entities/MucOptions.java +++ b/src/main/java/de/pixart/messenger/entities/MucOptions.java @@ -139,6 +139,7 @@ public class MucOptions { PASSWORD_REQUIRED, BANNED, MEMBERS_ONLY, + RESOURCE_CONSTRAINT, KICKED, SHUTDOWN, INVALID_NICK, diff --git a/src/main/java/de/pixart/messenger/parser/PresenceParser.java b/src/main/java/de/pixart/messenger/parser/PresenceParser.java index f3ca0e747..3b6b83fd4 100644 --- a/src/main/java/de/pixart/messenger/parser/PresenceParser.java +++ b/src/main/java/de/pixart/messenger/parser/PresenceParser.java @@ -162,6 +162,8 @@ public class PresenceParser extends AbstractParser implements mucOptions.setError(MucOptions.Error.BANNED); } else if (error.hasChild("registration-required")) { mucOptions.setError(MucOptions.Error.MEMBERS_ONLY); + } else if (error.hasChild("resource-constraint")) { + mucOptions.setError(MucOptions.Error.RESOURCE_CONSTRAINT); } else { final String text = error.findChildContent("text"); if (text != null && text.contains("attribute 'to'")) { diff --git a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java index a22b775b3..4ec01434d 100644 --- a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java +++ b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java @@ -2330,6 +2330,9 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke case MEMBERS_ONLY: showSnackbar(R.string.conference_members_only, R.string.leave, leaveMuc); break; + case RESOURCE_CONSTRAINT: + showSnackbar(R.string.conference_resource_constraint, R.string.try_again, joinMuc); + break; case KICKED: showSnackbar(R.string.conference_kicked, R.string.join, joinMuc); break; diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml index 95f23cf2a..a04d2c9ee 100644 --- a/src/main/res/values/strings.xml +++ b/src/main/res/values/strings.xml @@ -802,4 +802,5 @@ <string name="providing_a_name_is_optional">Providing a name is optional</string> <string name="create_dialog_group_chat_name">Group chat name</string> <string name="everyone_has_read_up_to_this_point">Everyone has read up to this point</string> + <string name="conference_resource_constraint">Resource constraint</string> </resources> |