aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2016-09-06 12:15:08 +0200
committerChristian Schneppe <christian@pix-art.de>2016-09-07 20:20:58 +0200
commitdd7bdd807b732cb8f1f7e6b3030ec57d48009ab1 (patch)
treee0c555ae3c9614e8c0e5be324374b4bd58dac400 /src/main/java
parentc6428e4af7ca1cc38a8b9ccf7380d526ddd80507 (diff)
show server not found muc error
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/de/pixart/messenger/entities/MucOptions.java1
-rw-r--r--src/main/java/de/pixart/messenger/services/XmppConnectionService.java8
-rw-r--r--src/main/java/de/pixart/messenger/ui/ConversationFragment.java3
3 files changed, 10 insertions, 2 deletions
diff --git a/src/main/java/de/pixart/messenger/entities/MucOptions.java b/src/main/java/de/pixart/messenger/entities/MucOptions.java
index da2045d26..d74c5549d 100644
--- a/src/main/java/de/pixart/messenger/entities/MucOptions.java
+++ b/src/main/java/de/pixart/messenger/entities/MucOptions.java
@@ -115,6 +115,7 @@ public class MucOptions {
public enum Error {
NO_RESPONSE,
+ SEVRER_NOT_FOUND,
NONE,
NICK_IN_USE,
PASSWORD_REQUIRED,
diff --git a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java
index af33475e4..0ac5633c1 100644
--- a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java
+++ b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java
@@ -2110,8 +2110,12 @@ public class XmppConnectionService extends Service {
@Override
public void onFetchFailed(final Conversation conversation, Element error) {
- join(conversation);
- fetchConferenceConfiguration(conversation);
+ if (error != null && "remote-server-not-found".equals(error.getName())) {
+ conversation.getMucOptions().setError(MucOptions.Error.SEVRER_NOT_FOUND);
+ } else {
+ join(conversation);
+ fetchConferenceConfiguration(conversation);
+ }
}
});
updateConversationUi();
diff --git a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java
index b89e8351c..ba093267f 100644
--- a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java
+++ b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java
@@ -876,6 +876,9 @@ public class ConversationFragment extends Fragment implements EditMessage.Keyboa
case NO_RESPONSE:
showSnackbar(R.string.joining_conference, 0, null);
break;
+ case SEVRER_NOT_FOUND:
+ showSnackbar(R.string.remote_server_not_found,R.string.leave, leaveMuc);
+ break;
case PASSWORD_REQUIRED:
showSnackbar(R.string.conference_requires_password, R.string.enter_password, enterPassword);
break;