diff sat/plugins/plugin_comp_ap_gateway/__init__.py @ 3994:69d970f974ff

component AP gateway: don't percent-encode `@`: Mastodon doesn't like when "@" is percent-encoded (because it doesn't do it, and it checks that the URL matches the ID without taking care of percent-encoding).
author Goffi <goffi@goffi.org>
date Fri, 10 Feb 2023 17:20:02 +0100
parents 996e0f84935e
children b13673d998dc
line wrap: on
line diff
--- a/sat/plugins/plugin_comp_ap_gateway/__init__.py	Mon Dec 05 11:54:47 2022 +0100
+++ b/sat/plugins/plugin_comp_ap_gateway/__init__.py	Fri Feb 10 17:20:02 2023 +0100
@@ -838,7 +838,7 @@
         """
         return parse.urljoin(
             self.base_ap_url,
-            str(Path(type_).joinpath(*(parse.quote_plus(a) for a in args)))
+            str(Path(type_).joinpath(*(parse.quote_plus(a, safe="@") for a in args)))
         )
 
     def isLocalURL(self, url: str) -> bool: