diff options
Diffstat (limited to 'src/main/java/de/pixart/messenger/entities')
-rw-r--r-- | src/main/java/de/pixart/messenger/entities/Presence.java | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/main/java/de/pixart/messenger/entities/Presence.java b/src/main/java/de/pixart/messenger/entities/Presence.java index af467f1f6..e21da6b37 100644 --- a/src/main/java/de/pixart/messenger/entities/Presence.java +++ b/src/main/java/de/pixart/messenger/entities/Presence.java @@ -47,19 +47,22 @@ public class Presence implements Comparable { private ServiceDiscoveryResult disco; private final String ver; private final String hash; + private final String node; private final String message; - private Presence(Status status, String ver, String hash, String message) { + private Presence(Status status, String ver, String hash, String node, String message) { this.status = status; this.ver = ver; this.hash = hash; + this.node = node; this.message = message; } public static Presence parse(String show, Element caps, String message) { final String hash = caps == null ? null : caps.getAttribute("hash"); final String ver = caps == null ? null : caps.getAttribute("ver"); - return new Presence(Status.fromShowString(show), ver, hash, message); + final String node = caps == null ? null : caps.getAttribute("node"); + return new Presence(Status.fromShowString(show), ver, hash, node, message); } public int compareTo(Object other) { @@ -78,6 +81,10 @@ public class Presence implements Comparable { return this.ver; } + public String getNode() { + return this.node; + } + public String getHash() { return this.hash; } |