fixed #342 - otr with facebook and other services without resources

This commit is contained in:
iNPUTmice 2014-09-04 19:56:37 +02:00
parent 01389e900b
commit b8d289a932
1 changed files with 6 additions and 2 deletions

View File

@ -244,7 +244,7 @@ public class Message extends AbstractEntity {
} }
public void setPresence(String presence) { public void setPresence(String presence) {
if (presence == null || presence.isEmpty()) { if (presence == null) {
this.counterpart = this.counterpart.split("/")[0]; this.counterpart = this.counterpart.split("/")[0];
} else { } else {
this.counterpart = this.counterpart.split("/")[0] + "/" + presence; this.counterpart = this.counterpart.split("/")[0] + "/" + presence;
@ -259,10 +259,14 @@ public class Message extends AbstractEntity {
String[] counterparts = this.counterpart.split("/"); String[] counterparts = this.counterpart.split("/");
if (counterparts.length == 2) { if (counterparts.length == 2) {
return counterparts[1]; return counterparts[1];
} else {
if (this.counterpart.contains("/")) {
return "";
} else { } else {
return null; return null;
} }
} }
}
public void setJingleConnection(JingleConnection connection) { public void setJingleConnection(JingleConnection connection) {
this.jingleConnection = connection; this.jingleConnection = connection;