aboutsummaryrefslogtreecommitdiff
path: root/syncapi/storage/postgres/invites_table.go
diff options
context:
space:
mode:
authorNeil Alexander <neilalexander@users.noreply.github.com>2022-03-17 17:05:21 +0000
committerNeil Alexander <neilalexander@users.noreply.github.com>2022-03-17 17:05:21 +0000
commit4e64c270dbe5d438325903e4404ed4b9ec43c039 (patch)
tree703043599b6a3ed316df980de493b7ba03156d4e /syncapi/storage/postgres/invites_table.go
parent0fb94fc781a71219d5e537788e976bec1d84382c (diff)
Various bug fixes and tweaks around invites and membership
Diffstat (limited to 'syncapi/storage/postgres/invites_table.go')
-rw-r--r--syncapi/storage/postgres/invites_table.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/syncapi/storage/postgres/invites_table.go b/syncapi/storage/postgres/invites_table.go
index 48ad58c0..97001ae2 100644
--- a/syncapi/storage/postgres/invites_table.go
+++ b/syncapi/storage/postgres/invites_table.go
@@ -52,7 +52,7 @@ const insertInviteEventSQL = "" +
") VALUES ($1, $2, $3, $4, FALSE) RETURNING id"
const deleteInviteEventSQL = "" +
- "UPDATE syncapi_invite_events SET deleted=TRUE, id=nextval('syncapi_stream_id') WHERE event_id = $1 RETURNING id"
+ "UPDATE syncapi_invite_events SET deleted=TRUE, id=nextval('syncapi_stream_id') WHERE event_id = $1 AND deleted=FALSE RETURNING id"
const selectInviteEventsInRangeSQL = "" +
"SELECT room_id, headered_event_json, deleted FROM syncapi_invite_events" +