aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/parser
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2016-02-01 12:11:40 +0100
committerDaniel Gultsch <daniel@gultsch.de>2016-02-01 12:11:40 +0100
commita3e11415ec06945bea88b49c99a5662773c8bf17 (patch)
tree95ae4b87c590f7e5431c03efa5af9f7edc9de19f /src/main/java/eu/siacs/conversations/parser
parent2eef37174e1034995d79af03cd1c0a3f8f9f3488 (diff)
refactored user handling in conferences. show try again button when conference has errors
Diffstat (limited to 'src/main/java/eu/siacs/conversations/parser')
-rw-r--r--src/main/java/eu/siacs/conversations/parser/PresenceParser.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/main/java/eu/siacs/conversations/parser/PresenceParser.java b/src/main/java/eu/siacs/conversations/parser/PresenceParser.java
index d27182c1..a07b42a9 100644
--- a/src/main/java/eu/siacs/conversations/parser/PresenceParser.java
+++ b/src/main/java/eu/siacs/conversations/parser/PresenceParser.java
@@ -1,8 +1,12 @@
package eu.siacs.conversations.parser;
+import android.util.Log;
+
import java.util.ArrayList;
import java.util.List;
+
+import eu.siacs.conversations.Config;
import eu.siacs.conversations.crypto.PgpEngine;
import eu.siacs.conversations.entities.Account;
import eu.siacs.conversations.entities.Contact;
@@ -35,6 +39,7 @@ public class PresenceParser extends AbstractParser implements
processConferencePresence(packet, mucOptions);
final List<MucOptions.User> tileUserAfter = mucOptions.getUsers(5);
if (!tileUserAfter.equals(tileUserBefore)) {
+ Log.d(Config.LOGTAG,account.getJid().toBareJid()+": update tiles for "+conversation.getName());
mXmppConnectionService.getAvatarService().clear(mucOptions);
}
if (before != mucOptions.online() || (mucOptions.online() && count != mucOptions.getUserCount())) {
@@ -56,12 +61,13 @@ public class PresenceParser extends AbstractParser implements
if (x != null) {
Element item = x.findChild("item");
if (item != null && !from.isBareJid()) {
+ mucOptions.setError(MucOptions.ERROR_NO_ERROR);
MucOptions.User user = new MucOptions.User(mucOptions,from);
user.setAffiliation(item.getAttribute("affiliation"));
user.setRole(item.getAttribute("role"));
user.setJid(item.getAttributeAsJid("jid"));
if (codes.contains(MucOptions.STATUS_CODE_SELF_PRESENCE) || packet.getFrom().equals(mucOptions.getConversation().getJid())) {
- mucOptions.setError(MucOptions.ERROR_NO_ERROR);
+ mucOptions.setOnline();
mucOptions.setSelf(user);
if (mucOptions.mNickChangingInProgress) {
if (mucOptions.onRenameListener != null) {
@@ -108,6 +114,7 @@ public class PresenceParser extends AbstractParser implements
mucOptions.setError(MucOptions.ERROR_MEMBERS_ONLY);
} else {
mucOptions.setError(MucOptions.ERROR_UNKNOWN);
+ Log.d(Config.LOGTAG, "unknown error in conference: " + packet);
}
} else if (!from.isBareJid()){
MucOptions.User user = mucOptions.deleteUser(from.getResourcepart());