aboutsummaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/de/pixart/messenger/entities/MucOptions.java1
-rw-r--r--src/main/java/de/pixart/messenger/parser/PresenceParser.java2
-rw-r--r--src/main/java/de/pixart/messenger/ui/ConversationFragment.java7
-rw-r--r--src/main/res/values/strings.xml1
4 files changed, 11 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 cf09e73a7..ec7770d77 100644
--- a/src/main/java/de/pixart/messenger/entities/MucOptions.java
+++ b/src/main/java/de/pixart/messenger/entities/MucOptions.java
@@ -655,6 +655,7 @@ public class MucOptions {
public enum Error {
NO_RESPONSE,
SERVER_NOT_FOUND,
+ REMOTE_SERVER_TIMEOUT,
NONE,
NICK_IN_USE,
PASSWORD_REQUIRED,
diff --git a/src/main/java/de/pixart/messenger/parser/PresenceParser.java b/src/main/java/de/pixart/messenger/parser/PresenceParser.java
index 6a878d27f..710eca717 100644
--- a/src/main/java/de/pixart/messenger/parser/PresenceParser.java
+++ b/src/main/java/de/pixart/messenger/parser/PresenceParser.java
@@ -184,6 +184,8 @@ public class PresenceParser extends AbstractParser implements
mucOptions.setError(MucOptions.Error.MEMBERS_ONLY);
} else if (error.hasChild("resource-constraint")) {
mucOptions.setError(MucOptions.Error.RESOURCE_CONSTRAINT);
+ } else if (error.hasChild("remote-server-timeout")) {
+ mucOptions.setError(MucOptions.Error.REMOTE_SERVER_TIMEOUT);
} else if (error.hasChild("gone")) {
final String gone = error.findChildContent("gone");
final Jid alternate;
diff --git a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java
index c38072dbe..48eb19909 100644
--- a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java
+++ b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java
@@ -2367,6 +2367,13 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke
showSnackbar(R.string.remote_server_not_found, R.string.leave, leaveMuc);
}
break;
+ case REMOTE_SERVER_TIMEOUT:
+ if (conversation.receivedMessagesCount() > 0) {
+ showSnackbar(R.string.remote_server_timeout, R.string.try_again, joinMuc);
+ } else {
+ showSnackbar(R.string.remote_server_timeout, R.string.leave, leaveMuc);
+ }
+ break;
case PASSWORD_REQUIRED:
showSnackbar(R.string.conference_requires_password, R.string.enter_password, enterPassword);
break;
diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml
index a00750708..0016bb5d5 100644
--- a/src/main/res/values/strings.xml
+++ b/src/main/res/values/strings.xml
@@ -833,5 +833,6 @@
<string name="delete_file_dialog">Delete file</string>
<string name="delete_file_dialog_msg">Are you sure you want to delete this file?\n\n<b>Warning:</b> This will not delete copies of this file that are stored on other devices or servers. </string>
<string name="cancelled">cancelled</string>
+ <string name="remote_server_timeout">Remote server timeout</string>
</resources>