aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/entities/Contact.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/eu/siacs/conversations/entities/Contact.java')
-rw-r--r--src/eu/siacs/conversations/entities/Contact.java9
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 59e0fa12..248d41b7 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;
+ }
+ }
}