From 3fad7c2d7f5ff4d9e0a5f8ee4eb9825db47bdc2e Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Wed, 20 Jan 2021 18:08:36 +0000 Subject: [PATCH] Fix bugs --- syncapi/storage/postgres/memberships_table.go | 5 ++--- syncapi/storage/sqlite3/memberships_table.go | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/syncapi/storage/postgres/memberships_table.go b/syncapi/storage/postgres/memberships_table.go index 7c2c407ac..6566544d6 100644 --- a/syncapi/storage/postgres/memberships_table.go +++ b/syncapi/storage/postgres/memberships_table.go @@ -1,5 +1,4 @@ -// Copyright 2017-2018 New Vector Ltd -// Copyright 2019-2020 The Matrix.org Foundation C.I.C. +// Copyright 2021 The Matrix.org Foundation C.I.C. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -94,7 +93,7 @@ func (s *membershipsStatements) UpsertMembership( _, err = sqlutil.TxStmt(txn, s.upsertMembershipStmt).ExecContext( ctx, event.RoomID(), - event.EventID(), + *event.StateKey(), membership, event.EventID(), streamPos, diff --git a/syncapi/storage/sqlite3/memberships_table.go b/syncapi/storage/sqlite3/memberships_table.go index 725d8d9ff..e5445e815 100644 --- a/syncapi/storage/sqlite3/memberships_table.go +++ b/syncapi/storage/sqlite3/memberships_table.go @@ -1,5 +1,4 @@ -// Copyright 2017-2018 New Vector Ltd -// Copyright 2019-2020 The Matrix.org Foundation C.I.C. +// Copyright 2021 The Matrix.org Foundation C.I.C. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -94,7 +93,7 @@ func (s *membershipsStatements) UpsertMembership( _, err = sqlutil.TxStmt(txn, s.upsertMembershipStmt).ExecContext( ctx, event.RoomID(), - event.EventID(), + *event.StateKey(), membership, event.EventID(), streamPos,