diff options
author | Gayaz Yusipov <gzep@vingrad.ru> | 2014-08-31 23:14:05 +0400 |
---|---|---|
committer | Gayaz Yusipov <gzep@vingrad.ru> | 2014-08-31 23:14:05 +0400 |
commit | 5b24534ab6a0ee6ff0d54ccfd9c16b795ead44a3 (patch) | |
tree | 73a1110ae53aed858b6b3f31725ddcfd56c5274a /src | |
parent | ec6220969d362195630c17ec472bcb225838e9ae (diff) |
Contact presenceName property
Diffstat (limited to 'src')
-rw-r--r-- | src/eu/siacs/conversations/entities/Contact.java | 7 | ||||
-rw-r--r-- | src/eu/siacs/conversations/parser/PresenceParser.java | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/eu/siacs/conversations/entities/Contact.java b/src/eu/siacs/conversations/entities/Contact.java index ab05b9d1..5892563d 100644 --- a/src/eu/siacs/conversations/entities/Contact.java +++ b/src/eu/siacs/conversations/entities/Contact.java @@ -32,6 +32,7 @@ public class Contact implements ListItem { protected String accountUuid; protected String systemName; protected String serverName; + protected String presenceName; protected String jid; protected int subscription = 0; protected String systemAccount; @@ -76,6 +77,8 @@ public class Contact implements ListItem { return this.systemName; } else if (this.serverName != null) { return this.serverName; + } else if (this.presenceName != null) { + return this.presenceName; } else { return this.jid.split("@")[0]; } @@ -175,6 +178,10 @@ public class Contact implements ListItem { this.systemName = systemName; } + public void setPresenceName(String presenceName) { + this.presenceName = presenceName; + } + public String getSystemAccount() { return systemAccount; } diff --git a/src/eu/siacs/conversations/parser/PresenceParser.java b/src/eu/siacs/conversations/parser/PresenceParser.java index 5e5501dd..9188924f 100644 --- a/src/eu/siacs/conversations/parser/PresenceParser.java +++ b/src/eu/siacs/conversations/parser/PresenceParser.java @@ -109,7 +109,7 @@ public class PresenceParser extends AbstractParser implements } Element nick = packet.findChild("nick", "http://jabber.org/protocol/nick"); if (nick != null) { - contact.setSystemName(nick.getContent()); + contact.setPresenceName(nick.getContent()); } } mXmppConnectionService.updateRosterUi(); |