PresenceParser: work around for ejabberd not including status code 110 in shut down presence
This commit is contained in:
parent
21480c9b98
commit
86f09dd9b9
|
@ -115,7 +115,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)) {
|
||||
|
|
|
@ -1107,10 +1107,10 @@ public class ConversationFragment extends Fragment implements EditMessage.Keyboa
|
|||
showSnackbar(R.string.conference_kicked, R.string.join, joinMuc);
|
||||
break;
|
||||
case UNKNOWN:
|
||||
showSnackbar(R.string.conference_unknown_error, R.string.join, joinMuc);
|
||||
showSnackbar(R.string.conference_unknown_error, R.string.try_again, joinMuc);
|
||||
break;
|
||||
case SHUTDOWN:
|
||||
showSnackbar(R.string.conference_shutdown, R.string.join, joinMuc);
|
||||
showSnackbar(R.string.conference_shutdown, R.string.try_again, joinMuc);
|
||||
break;
|
||||
default:
|
||||
hideSnackbar();
|
||||
|
|
Loading…
Reference in a new issue