From 931df9237fecb69921dcd4a333373eb314f1ac1f Mon Sep 17 00:00:00 2001 From: Daniel Aloni Date: Mon, 9 Jan 2023 10:11:21 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Post=20merge=20problems.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- clientapi/routing/register.go | 7 ++++--- syncapi/sync/request.go | 2 -- userapi/internal/api.go | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/clientapi/routing/register.go b/clientapi/routing/register.go index f077e48d5..e1bb1555c 100644 --- a/clientapi/routing/register.go +++ b/clientapi/routing/register.go @@ -965,9 +965,10 @@ func completeRegistration( // TODO-entry refuse register if threepid is already bound to account. if threePid != nil { err = userAPI.PerformSaveThreePIDAssociation(ctx, &userapi.PerformSaveThreePIDAssociationRequest{ - Medium: threePid.Medium, - ThreePID: threePid.Address, - Localpart: accRes.Account.Localpart, + Medium: threePid.Medium, + ThreePID: threePid.Address, + Localpart: accRes.Account.Localpart, + ServerName: accRes.Account.ServerName, }, &struct{}{}) if err != nil { return util.JSONResponse{ diff --git a/syncapi/sync/request.go b/syncapi/sync/request.go index 6a97e25bc..e5e5fdb5b 100644 --- a/syncapi/sync/request.go +++ b/syncapi/sync/request.go @@ -80,8 +80,6 @@ func newSyncRequest(req *http.Request, device userapi.Device, syncDB storage.Dat filter.AccountData.Limit = math.MaxInt32 filter.Room.AccountData.Limit = math.MaxInt32 } - // Ignore state limit filter so that e.g. correct room name appears on clients. - filter.Room.State.Limit = math.MaxInt32 logger := util.GetLogger(req.Context()).WithFields(logrus.Fields{ "user_id": device.UserID, diff --git a/userapi/internal/api.go b/userapi/internal/api.go index 7f30449e5..bde6707b7 100644 --- a/userapi/internal/api.go +++ b/userapi/internal/api.go @@ -625,7 +625,7 @@ func (a *UserInternalAPI) PerformAccountDeactivation(ctx context.Context, req *a return err } - threepids, err := a.DB.GetThreePIDsForLocalpart(ctx, req.Localpart) + threepids, err := a.DB.GetThreePIDsForLocalpart(ctx, req.Localpart, serverName) if err != nil { return err }