aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/xmpp/jid/Jid.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/eu/siacs/conversations/xmpp/jid/Jid.java')
-rw-r--r--src/main/java/eu/siacs/conversations/xmpp/jid/Jid.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/eu/siacs/conversations/xmpp/jid/Jid.java b/src/main/java/eu/siacs/conversations/xmpp/jid/Jid.java
index c40fa0b6..a35ea37c 100644
--- a/src/main/java/eu/siacs/conversations/xmpp/jid/Jid.java
+++ b/src/main/java/eu/siacs/conversations/xmpp/jid/Jid.java
@@ -32,7 +32,7 @@ public final class Jid {
return resourcepart;
}
- public static Jid fromSessionID(SessionID id) throws InvalidJidException{
+ public static Jid fromSessionID(final SessionID id) throws InvalidJidException{
if (id.getUserID().isEmpty()) {
return Jid.fromString(id.getAccountID());
} else {
@@ -190,4 +190,8 @@ public final class Jid {
public boolean isBareJid() {
return this.resourcepart.isEmpty();
}
+
+ public boolean isDomainJid() {
+ return !this.hasLocalpart();
+ }
}