From a0f8af820ec8db01a4b538eb239fee6d8f4e7008 Mon Sep 17 00:00:00 2001 From: Max Dor Date: Sun, 8 Apr 2018 22:05:36 +0200 Subject: [PATCH] Fix minor regression with Auth feature and REST/Memory backend See https://matrix.to/#/!NPRUEisLjcaMtHIzDr:kamax.io/$1523216730848820dFUZX:matrix.org --- .../io/kamax/mxisd/auth/provider/BackendAuthResult.java | 8 ++++---- .../kamax/mxisd/backend/memory/MemoryIdentityStore.java | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/io/kamax/mxisd/auth/provider/BackendAuthResult.java b/src/main/java/io/kamax/mxisd/auth/provider/BackendAuthResult.java index 3002c50..a89566d 100644 --- a/src/main/java/io/kamax/mxisd/auth/provider/BackendAuthResult.java +++ b/src/main/java/io/kamax/mxisd/auth/provider/BackendAuthResult.java @@ -20,7 +20,7 @@ package io.kamax.mxisd.auth.provider; -import io.kamax.matrix._ThreePid; +import io.kamax.matrix.ThreePid; import io.kamax.mxisd.UserID; import io.kamax.mxisd.UserIdType; @@ -32,13 +32,13 @@ public class BackendAuthResult { public static class BackendAuthProfile { private String displayName; - private Set<_ThreePid> threePids = new HashSet<>(); + private Set threePids = new HashSet<>(); public String getDisplayName() { return displayName; } - public Set<_ThreePid> getThreePids() { + public Set getThreePids() { return threePids; } } @@ -85,7 +85,7 @@ public class BackendAuthResult { return profile; } - public BackendAuthResult withThreePid(_ThreePid threePid) { + public BackendAuthResult withThreePid(ThreePid threePid) { this.profile.threePids.add(threePid); return this; diff --git a/src/main/java/io/kamax/mxisd/backend/memory/MemoryIdentityStore.java b/src/main/java/io/kamax/mxisd/backend/memory/MemoryIdentityStore.java index 8d14a95..bd6ee43 100644 --- a/src/main/java/io/kamax/mxisd/backend/memory/MemoryIdentityStore.java +++ b/src/main/java/io/kamax/mxisd/backend/memory/MemoryIdentityStore.java @@ -163,7 +163,7 @@ public class MemoryIdentityStore implements AuthenticatorProvider, IDirectoryPro return BackendAuthResult.failure(); } else { BackendAuthResult result = new BackendAuthResult(); - id.getThreepids().forEach(result::withThreePid); + id.getThreepids().forEach(tpid -> result.withThreePid(new ThreePid(tpid.getMedium(), tpid.getAddress()))); result.succeed(mxid.getId(), UserIdType.MatrixID.getId(), ""); return result; }