Skip to content

Commit

Permalink
Use urljoin for generating media links
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Aug 9, 2024
1 parent ad3429f commit 60de961
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion heisenbridge/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ def mxc_to_url(self, mxc: str, filename=None):
server=server, media_id=media_id, checksum=self.mxc_checksum(server, media_id), filename=filename
)

return "{}{}".format(self.media_endpoint, media_path)
return urllib.parse.urljoin(self.media_endpoint, media_path)

async def reset(self, config_file, homeserver_url):
with open(config_file) as f:
Expand Down

0 comments on commit 60de961

Please sign in to comment.