don't break existing query arguments

This commit is contained in:
MarkusRost 2023-02-18 22:01:35 +00:00
parent caf44345c1
commit 7bf2096e9c

View file

@ -163,7 +163,8 @@ def embed_upload_upload(ctx, change) -> DiscordMessage:
for num, revision in enumerate(urls):
if revision["timestamp"] == change["logparams"][
"img_timestamp"]: # find the correct revision corresponding for this log entry
image_direct_url = "{rev}?{cache}".format(rev=revision["url"],
image_direct_url = "{rev}{c}rcgcdw={cache}".format(rev=revision["url"],
c="&" if "?" in revision["url"] else "?",
cache=int(time.time() * 5)) # cachebusting
break
except KeyError: