fix bug with presences with no resource attached
This commit is contained in:
parent
dd71e252ae
commit
3a98a695d4
|
@ -241,6 +241,7 @@ public class XmppConnectionService extends Service {
|
||||||
}
|
}
|
||||||
String type = packet.getAttribute("type");
|
String type = packet.getAttribute("type");
|
||||||
if (type == null) {
|
if (type == null) {
|
||||||
|
if (fromParts.length == 2) {
|
||||||
Element show = packet.findChild("show");
|
Element show = packet.findChild("show");
|
||||||
if (show == null) {
|
if (show == null) {
|
||||||
contact.updatePresence(fromParts[1], Presences.ONLINE);
|
contact.updatePresence(fromParts[1], Presences.ONLINE);
|
||||||
|
@ -269,6 +270,9 @@ public class XmppConnectionService extends Service {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
databaseBackend.updateContact(contact);
|
databaseBackend.updateContact(contact);
|
||||||
|
} else {
|
||||||
|
//Log.d(LOGTAG,"presence without resource "+packet.toString());
|
||||||
|
}
|
||||||
} else if (type.equals("unavailable")) {
|
} else if (type.equals("unavailable")) {
|
||||||
if (fromParts.length != 2) {
|
if (fromParts.length != 2) {
|
||||||
// Log.d(LOGTAG,"received presence with no resource "+packet.toString());
|
// Log.d(LOGTAG,"received presence with no resource "+packet.toString());
|
||||||
|
|
Loading…
Reference in New Issue