diff options
author | Christian Schneppe <christian@pix-art.de> | 2017-12-01 21:50:23 +0100 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2017-12-01 21:50:23 +0100 |
commit | d599b04ac3639da781062069a64fac68861f671d (patch) | |
tree | d05a1b6b1227ae716e17efd4ca0630b197a5163c /src/main/java/de/pixart/messenger/parser | |
parent | ffd61bf7d04ab2691ff55df26bd79d1b5c31b0b0 (diff) |
PresenceParser: work around for ejabberd not including status code 110 in shut down presence
Diffstat (limited to '')
-rw-r--r-- | src/main/java/de/pixart/messenger/parser/PresenceParser.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/parser/PresenceParser.java b/src/main/java/de/pixart/messenger/parser/PresenceParser.java index e46947304..2bb7e6aac 100644 --- a/src/main/java/de/pixart/messenger/parser/PresenceParser.java +++ b/src/main/java/de/pixart/messenger/parser/PresenceParser.java @@ -113,7 +113,9 @@ public class PresenceParser extends AbstractParser implements } } } else if (type.equals("unavailable")) { - if (codes.contains(MucOptions.STATUS_CODE_SELF_PRESENCE)) { + if (codes.contains(MucOptions.STATUS_CODE_SHUTDOWN) && from.equals(mucOptions.getSelf().getFullJid())) { + mucOptions.setError(MucOptions.Error.SHUTDOWN); + } else if (codes.contains(MucOptions.STATUS_CODE_SELF_PRESENCE)) { if (codes.contains(MucOptions.STATUS_CODE_KICKED)) { mucOptions.setError(MucOptions.Error.KICKED); } else if (codes.contains(MucOptions.STATUS_CODE_BANNED)) { |