From f62df4016ddae451017f8fea688362a93c03c6c6 Mon Sep 17 00:00:00 2001 From: Dmytro Meleshko Date: Mon, 18 Jan 2021 11:18:34 +0200 Subject: [PATCH] [scripts/copy-crosscode-emoji-url] change the order of URL params --- scripts/copy-crosscode-emoji-url | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/copy-crosscode-emoji-url b/scripts/copy-crosscode-emoji-url index b34b43c..2e22b6c 100755 --- a/scripts/copy-crosscode-emoji-url +++ b/scripts/copy-crosscode-emoji-url @@ -68,15 +68,15 @@ chosen_emote = emotes[chosen_index] emote_url = urllib.parse.urlparse(chosen_emote["url"]) emote_url_query = urllib.parse.parse_qs(emote_url.query) +if config.getboolean("default", "add_emote_name_to_url", fallback=False): + emote_url_query["name"] = [chosen_emote["name"]] + default_emote_image_size = config.getint( "default", "default_emote_image_size", fallback=None ) if default_emote_image_size is not None: emote_url_query["size"] = [str(default_emote_image_size)] -if config.getboolean("default", "add_emote_name_to_url", fallback=False): - emote_url_query["name"] = [chosen_emote["name"]] - emote_url_query = urllib.parse.urlencode(emote_url_query, doseq=True) emote_url = urllib.parse.urlunparse(emote_url._replace(query=emote_url_query))