Skip to content

Commit

Permalink
Revert gyazo image embedding
Browse files Browse the repository at this point in the history
  • Loading branch information
raidensakura committed Dec 26, 2023
1 parent 79c8c67 commit 36578bf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,15 @@ 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.

### 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.
Expand Down
12 changes: 0 additions & 12 deletions core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down

0 comments on commit 36578bf

Please sign in to comment.