Avoid conflict between 3PID expired user and Matrix ID users event

This commit is contained in:
Max Dor
2019-05-13 16:08:35 +02:00
parent 0fcc0d9bb2
commit c3ce0a17f6

View File

@@ -90,7 +90,7 @@ public class MembershipEventProcessor implements EventTypeProcessor {
boolean isForExpInvUser = StringUtils.equals(target.getLocalPart(), cfg.getAppsvc().getUser().getInviteExpired());
if (StringUtils.equals("join", EventKey.Membership.getStringOrNull(content))) {
if (!isForMainUser) {
if (isForExpInvUser) {
log.warn("We joined the room {} for another identity as the main user, which is not supported. Leaving...", roomId);
client.getUser(target.getLocalPart()).getRoom(roomId).tryLeave().ifPresent(err -> {