aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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
-rw-r--r--src/main/res/values/strings.xml12
4 files changed, 17 insertions, 7 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;
diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml
index 9481c5f80..68f6da28e 100644
--- a/src/main/res/values/strings.xml
+++ b/src/main/res/values/strings.xml
@@ -690,9 +690,11 @@
<string name="me">Me</string>
<string name="contact_asks_for_presence_subscription">Contact asks for presence subscription</string>
<string name="allow">Allow</string>
- <string name="attach_choose_video">Choose video</string>
- <string name="preparing_video">Prepare video for transmission</string>
- <string name="compressing_video">Compressing video, please wait…</string>
- <string name="shared_video_with_x">Shared video with %s</string>
- <string name="unread_messages">Unread messages:</string>
+ <string name="attach_choose_video">Choose video</string>
+ <string name="preparing_video">Prepare video for transmission</string>
+ <string name="compressing_video">Compressing video, please wait…</string>
+ <string name="shared_video_with_x">Shared video with %s</string>
+ <string name="unread_messages">Unread messages:</string>
+ <string name="no_permission_to_access_x">No permission to access %s</string>
+ <string name="remote_server_not_found">Remote server not found</string>
</resources>