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
pull/16425/head
Jason Little 2023-10-03 18:04:46 -05:00
parent c89b0bffea
commit de1267af91
1 changed files with 3 additions and 0 deletions

View File

@ -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