mirror of
https://github.com/element-hq/synapse.git
synced 2025-12-06 00:00:20 -05:00
Fix prefixed support for MSC4133 (#18875)
This fixes two bugs that affect the availability of MSC4133 until the next spec release. 1. The servlet didn't recognise the unstable endpoint even when the homeserver advertised it 2. The HS didn't advertise support for the stable prefixed version Would only have been a problem until the next spec release but it's nice to have it work before then.
This commit is contained in:
parent
74fdbc7b75
commit
d48e69ad4c
1
changelog.d/18875.bugfix
Normal file
1
changelog.d/18875.bugfix
Normal file
@ -0,0 +1 @@
|
||||
Fix prefixed support for MSC4133.
|
||||
@ -109,6 +109,12 @@ class ProfileFieldRestServlet(RestServlet):
|
||||
self.hs = hs
|
||||
self.profile_handler = hs.get_profile_handler()
|
||||
self.auth = hs.get_auth()
|
||||
if hs.config.experimental.msc4133_enabled:
|
||||
self.PATTERNS.append(
|
||||
re.compile(
|
||||
r"^/_matrix/client/unstable/uk\.tcpip\.msc4133/profile/(?P<user_id>[^/]*)/(?P<field_name>[^/]*)"
|
||||
)
|
||||
)
|
||||
|
||||
async def on_GET(
|
||||
self, request: SynapseRequest, user_id: str, field_name: str
|
||||
|
||||
@ -175,6 +175,7 @@ class VersionsRestServlet(RestServlet):
|
||||
"org.matrix.simplified_msc3575": msc3575_enabled,
|
||||
# Arbitrary key-value profile fields.
|
||||
"uk.tcpip.msc4133": self.config.experimental.msc4133_enabled,
|
||||
"uk.tcpip.msc4133.stable": True,
|
||||
# MSC4155: Invite filtering
|
||||
"org.matrix.msc4155": self.config.experimental.msc4155_enabled,
|
||||
# MSC4306: Support for thread subscriptions
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user