show snackbar for resource constraint in mucs
This commit is contained in:
parent
a1f933924c
commit
0fa97bdc11
|
@ -139,6 +139,7 @@ public class MucOptions {
|
|||
PASSWORD_REQUIRED,
|
||||
BANNED,
|
||||
MEMBERS_ONLY,
|
||||
RESOURCE_CONSTRAINT,
|
||||
KICKED,
|
||||
SHUTDOWN,
|
||||
INVALID_NICK,
|
||||
|
|
|
@ -166,6 +166,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'")) {
|
||||
|
|
|
@ -2014,6 +2014,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;
|
||||
|
|
|
@ -284,6 +284,7 @@
|
|||
<string name="toast_message_omemo_fingerprint">OMEMO fingerprint copied to clipboard!</string>
|
||||
<string name="conference_banned">You are banned from this group chat</string>
|
||||
<string name="conference_members_only">This group chat is members only</string>
|
||||
<string name="conference_resource_constraint">Resource constraint</string>
|
||||
<string name="conference_kicked">You have been kicked from this group chat</string>
|
||||
<string name="conference_shutdown">The group chat was shut down</string>
|
||||
<string name="conference_unknown_error">You are no longer in this group chat</string>
|
||||
|
|
Loading…
Reference in New Issue