mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-02 05:36:02 -04:00
Add endpoint that proxies ID server request token and errors if the given email is in use on this Home Server.
This commit is contained in:
parent
7148aaf5d0
commit
c77048e12f
4 changed files with 71 additions and 1 deletions
19
synapse/storage/schema/delta/22/user_threepids_unique.sql
Normal file
19
synapse/storage/schema/delta/22/user_threepids_unique.sql
Normal file
|
@ -0,0 +1,19 @@
|
|||
CREATE TABLE IF NOT EXISTS user_threepids2 (
|
||||
user_id TEXT NOT NULL,
|
||||
medium TEXT NOT NULL,
|
||||
address TEXT NOT NULL,
|
||||
validated_at BIGINT NOT NULL,
|
||||
added_at BIGINT NOT NULL,
|
||||
CONSTRAINT medium_address UNIQUE (medium, address)
|
||||
);
|
||||
|
||||
INSERT INTO user_threepids2
|
||||
SELECT * FROM user_threepids WHERE added_at IN (
|
||||
SELECT max(added_at) FROM user_threepids GROUP BY medium, address
|
||||
)
|
||||
;
|
||||
|
||||
DROP TABLE user_threepids;
|
||||
ALTER TABLE user_threepids2 RENAME TO user_threepids;
|
||||
|
||||
CREATE INDEX user_threepids_user_id ON user_threepids(user_id);
|
Loading…
Add table
Add a link
Reference in a new issue