aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/services
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2017-02-14 20:45:23 +0100
committerChristian Schneppe <christian@pix-art.de>2017-02-14 20:45:23 +0100
commit8b3ca970caa286e7e7216d6753c0ddc8ec8c04c5 (patch)
tree908324d40011dd39bd1625c3393121143bca92ff /src/main/java/de/pixart/messenger/services
parent7c49e47659897c80d7e1b5998c66a7caa97fedc6 (diff)
fixed adhoc conference creation behaviour. properly show errors
Diffstat (limited to 'src/main/java/de/pixart/messenger/services')
-rw-r--r--src/main/java/de/pixart/messenger/services/XmppConnectionService.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java
index 752e65cfb..bae703b59 100644
--- a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java
+++ b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java
@@ -2484,7 +2484,7 @@ public class XmppConnectionService extends Service {
}
}
- private String findConferenceServer(final Account account) {
+ public String findConferenceServer(final Account account) {
String server;
if (account.getXmppConnection() != null) {
server = account.getXmppConnection().getMucServer();
@@ -2503,7 +2503,7 @@ public class XmppConnectionService extends Service {
return null;
}
- public void createAdhocConference(final Account account,
+ public boolean createAdhocConference(final Account account,
final String subject,
final Iterable<Jid> jids,
final UiCallback<Conversation> callback) {
@@ -2515,7 +2515,7 @@ public class XmppConnectionService extends Service {
if (callback != null) {
callback.error(R.string.no_conference_server_found, null);
}
- return;
+ return false;
}
final Jid jid = Jid.fromParts(new BigInteger(64, getRNG()).toString(Character.MAX_RADIX), server, null);
final Conversation conversation = findOrCreateConversation(account, jid, true);
@@ -2550,15 +2550,18 @@ public class XmppConnectionService extends Service {
});
}
});
+ return true;
} catch (InvalidJidException e) {
if (callback != null) {
callback.error(R.string.conference_creation_failed, null);
}
+ return true;
}
} else {
if (callback != null) {
callback.error(R.string.not_connected_try_again, null);
}
+ return true;
}
}