diff options
author | iNPUTmice <daniel@gultsch.de> | 2014-07-10 19:42:37 +0200 |
---|---|---|
committer | iNPUTmice <daniel@gultsch.de> | 2014-07-10 19:42:37 +0200 |
commit | a523127a805db12a82701ccf7cf6a21d979607d2 (patch) | |
tree | 3a0abf186f80123c9070a7b5e7d107bc0e7b6960 /src/eu/siacs/conversations/entities | |
parent | e97b5244552c8da06b3311bccb831be30c9a641a (diff) |
fixed #38
Diffstat (limited to 'src/eu/siacs/conversations/entities')
-rw-r--r-- | src/eu/siacs/conversations/entities/Contact.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/eu/siacs/conversations/entities/Contact.java b/src/eu/siacs/conversations/entities/Contact.java index 59e0fa126..248d41b76 100644 --- a/src/eu/siacs/conversations/entities/Contact.java +++ b/src/eu/siacs/conversations/entities/Contact.java @@ -320,4 +320,13 @@ public class Contact implements ListItem { public int compareTo(ListItem another) { return this.getDisplayName().compareToIgnoreCase(another.getDisplayName()); } + + public String getServer() { + String[] split = getJid().split("@"); + if (split.length >= 2) { + return split[1]; + } else { + return null; + } + } } |