032: accept bare room IDs (tuwunel 1.9.4 mints and serves them without :server)
This commit is contained in:
parent
fd09967851
commit
cbbe713dea
2 changed files with 12 additions and 7 deletions
11
apps/api/migrations/032_room_id_bare_form.sql
Normal file
11
apps/api/migrations/032_room_id_bare_form.sql
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
-- 032: accept homeservers that mint room IDs without the :server suffix.
|
||||
--
|
||||
-- tuwunel 1.9.4 returns BARE room IDs from createRoom ("!localpart") and its
|
||||
-- client API only accepts that bare form for those rooms (the suffixed form
|
||||
-- 500s with "no forward extremities"). The 030 check demanded the full
|
||||
-- "!localpart:server" spec form, which made every provisioned collective fail.
|
||||
-- Accept both forms; the homeserver is the authority on its own IDs.
|
||||
|
||||
ALTER TABLE group_rooms DROP CONSTRAINT group_rooms_room_id_check;
|
||||
ALTER TABLE group_rooms ADD CONSTRAINT group_rooms_room_id_check
|
||||
CHECK (room_id ~ '^![^:\s]+(:[^:\s]+)?$');
|
||||
Loading…
Add table
Add a link
Reference in a new issue