From 5d02e7a25fb3c54c6addd2e25c3a12790397e3e0 Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Tue, 26 Oct 2021 15:24:02 -0400 Subject: [PATCH 1/2] Prefer the stable identifier for MSC3288. --- sydent/http/servlets/store_invite_servlet.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sydent/http/servlets/store_invite_servlet.py b/sydent/http/servlets/store_invite_servlet.py index ada6506a..a344a603 100644 --- a/sydent/http/servlets/store_invite_servlet.py +++ b/sydent/http/servlets/store_invite_servlet.py @@ -125,10 +125,12 @@ def render_POST(self, request: Request) -> JsonDict: for k in extra_substitutions: substitutions.setdefault(k, "") - # MSC3288 - substitutions["room_type"] = substitutions.get( - "org.matrix.msc3288.room_type", "" - ) + # For MSC3288 room type, prefer the stable field, but fallback to the + # unstable field. + if "room_type" not in substitutions: + substitutions["room_type"] = substitutions.get( + "org.matrix.msc3288.room_type", "" + ) substitutions["bracketed_verified_sender"] = "" if verified_sender: From ac5422eec5fc5ec48d2662dc5d44dca591549a69 Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Tue, 26 Oct 2021 15:25:53 -0400 Subject: [PATCH 2/2] Newsfragment --- changelog.d/437.feature | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/437.feature diff --git a/changelog.d/437.feature b/changelog.d/437.feature new file mode 100644 index 00000000..dd281090 --- /dev/null +++ b/changelog.d/437.feature @@ -0,0 +1 @@ +Support the stable room type field for [MSC3288](https://github.com/matrix-org/matrix-doc/pull/3288).