From 36578bf2b5c4b2886ee303d617980a702df79477 Mon Sep 17 00:00:00 2001 From: Raiden Sakura Date: Wed, 27 Dec 2023 00:52:32 +0800 Subject: [PATCH] Revert gyazo image embedding --- CHANGELOG.md | 2 ++ core/utils.py | 12 ------------ 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b84e2faec..d5257ab764 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ however, insignificant breaking changes do not guarantee a major version bump, s - Added `content_type` to attachments stored in the database. - Introduced multiplatform Docker workflow for GitHub Actions. - Improved join/leave message for multiple servers. +- Added `log_expiration` config to auto-delete old logs on a schedule. ### Changed - Changing a threads title or NSFW status immediately updates the status in the database. @@ -26,6 +27,7 @@ however, insignificant breaking changes do not guarantee a major version bump, s ### Removed - The logviewer plugin is no longer included locally. - Removed lottie sticker support and its dependencies due to unnecessary bulk. +- The bot will no longer embed image from gyazo. ### Fixed - Persistent notes have been fixed after the previous discord.py update. diff --git a/core/utils.py b/core/utils.py index 7264f9a469..e16aa45ba0 100644 --- a/core/utils.py +++ b/core/utils.py @@ -149,18 +149,6 @@ def is_image_url(url: str, **kwargs) -> str: bool Whether the URL is a valid image URL. """ - try: - result = parse.urlparse(url) - if result.netloc == "gyazo.com" and result.scheme in ["http", "https"]: - # gyazo support - url = re.sub( - r"(https?://)((?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*(),]|%[0-9a-fA-F][0-9a-fA-F])+)", - r"\1i.\2.png", - url, - ) - except ValueError: - pass - return parse_image_url(url, **kwargs)