From de1267af91cd262840d559f5cae7e1756132ffa5 Mon Sep 17 00:00:00 2001 From: Jason Little Date: Tue, 3 Oct 2023 18:04:46 -0500 Subject: [PATCH] Mutate the url string if it's for unix sockets to include a ':' at the end of the socket filename The ApplicationServiceAgent knows what to do with this --- synapse/appservice/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/synapse/appservice/__init__.py b/synapse/appservice/__init__.py index b26b76f1fe..41788e127c 100644 --- a/synapse/appservice/__init__.py +++ b/synapse/appservice/__init__.py @@ -86,6 +86,9 @@ class ApplicationService: self.url = ( url.rstrip("/") if isinstance(url, str) else None ) # url must not end with a slash + if self.url and self.url.startswith("unix"): + # This is probably a Unix Socket, append a ':' to the end so we can parse it + self.url = self.url + ":" self.hs_token = hs_token # The full Matrix ID for this application service's sender. self.sender = sender