Add handling of status code 333

This is used when something goes wrong with a MUC, e.g. a connection
error made the MUC kick you out. In this case you generally want to try
to rejoin.
This commit is contained in:
Kim Alvefur 2022-02-16 17:19:00 +01:00 committed by Daniel Gultsch
parent eb6ae5b03c
commit aef5292567
2 changed files with 4 additions and 1 deletions

View file

@ -34,6 +34,7 @@ public class MucOptions {
public static final String STATUS_CODE_AFFILIATION_CHANGE = "321";
public static final String STATUS_CODE_LOST_MEMBERSHIP = "322";
public static final String STATUS_CODE_SHUTDOWN = "332";
public static final String STATUS_CODE_TECHNICAL_REASONS = "333";
private final Set<User> users = new HashSet<>();
private final Conversation conversation;
public OnRenameListener onRenameListener = null;

View file

@ -143,7 +143,9 @@ public class PresenceParser extends AbstractParser implements
} else if (codes.contains(MucOptions.STATUS_CODE_SHUTDOWN) && fullJidMatches) {
mucOptions.setError(MucOptions.Error.SHUTDOWN);
} else if (codes.contains(MucOptions.STATUS_CODE_SELF_PRESENCE)) {
if (codes.contains(MucOptions.STATUS_CODE_KICKED)) {
if (codes.contains(MucOptions.STATUS_CODE_TECHNICAL_REASONS)) {
mucOptions.setError(MucOptions.Error.UNKNOWN);
} else if (codes.contains(MucOptions.STATUS_CODE_KICKED)) {
mucOptions.setError(MucOptions.Error.KICKED);
} else if (codes.contains(MucOptions.STATUS_CODE_BANNED)) {
mucOptions.setError(MucOptions.Error.BANNED);