diff options
author | iNPUTmice <daniel@gultsch.de> | 2014-09-27 11:37:02 +0200 |
---|---|---|
committer | iNPUTmice <daniel@gultsch.de> | 2014-09-27 11:37:02 +0200 |
commit | 8fb0fb0c0d7a760d1bea33701a794f3ab2ba6664 (patch) | |
tree | a5da94fdecb53b28e47381c4b34a1ffb7988c39a /src/eu/siacs/conversations/entities | |
parent | 6e7734340797c0e929a3669056d0c1361cac7384 (diff) |
anwser to xmpp: style uris. fixed open conversations from android address book
Diffstat (limited to 'src/eu/siacs/conversations/entities')
-rw-r--r-- | src/eu/siacs/conversations/entities/Roster.java | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/eu/siacs/conversations/entities/Roster.java b/src/eu/siacs/conversations/entities/Roster.java index f11f0250..b6908793 100644 --- a/src/eu/siacs/conversations/entities/Roster.java +++ b/src/eu/siacs/conversations/entities/Roster.java @@ -14,13 +14,18 @@ public class Roster { this.account = account; } - public boolean hasContact(String jid) { - String cleanJid = jid.split("/",2)[0]; - return contacts.containsKey(cleanJid); + public Contact getContactAsShownInRoster(String jid) { + String cleanJid = jid.split("/", 2)[0]; + Contact contact = contacts.get(cleanJid); + if (contact != null && contact.showInRoster()) { + return contact; + } else { + return null; + } } public Contact getContact(String jid) { - String cleanJid = jid.split("/",2)[0].toLowerCase(Locale.getDefault()); + String cleanJid = jid.split("/", 2)[0].toLowerCase(Locale.getDefault()); if (contacts.containsKey(cleanJid)) { return contacts.get(cleanJid); } else { |