diff options
| author | Fuwn <[email protected]> | 2025-09-18 22:53:36 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2025-09-18 22:53:36 -0700 |
| commit | be6aa970aec7139d20ab9036cfb2ec3e5a240845 (patch) | |
| tree | 55415061019b267d899a517dc45f56013a459bc5 | |
| parent | fix(irm): Image identification and Mod Mail bugs (diff) | |
| download | umabot-be6aa970aec7139d20ab9036cfb2ec3e5a240845.tar.xz umabot-be6aa970aec7139d20ab9036cfb2ec3e5a240845.zip | |
Revert "fix(irm): Image identification and Mod Mail bugs"
This reverts commit 3a5627e8e451d22fd5b795acd62890322f90c63c.
| -rw-r--r-- | src/umabot/rules/intelligent_moderator_base.py | 21 | ||||
| -rw-r--r-- | src/umabot/rules/intelligent_roleplay_moderator.py | 4 |
2 files changed, 5 insertions, 20 deletions
diff --git a/src/umabot/rules/intelligent_moderator_base.py b/src/umabot/rules/intelligent_moderator_base.py index 39c00b0..2d04f14 100644 --- a/src/umabot/rules/intelligent_moderator_base.py +++ b/src/umabot/rules/intelligent_moderator_base.py @@ -189,23 +189,8 @@ Word Count: {word_count} return True # Check for gallery posts - these always have media - try: - if hasattr(submission, 'is_gallery') and submission.is_gallery: - return True - except AttributeError: - pass - - # Check for image posts (not self posts) - if not self._is_self(submission): - url = self._get_url(submission) - if url: - url_lower = url.lower() - # Check if it's a direct image link - if any(ext in url_lower for ext in ['.jpg', '.jpeg', '.png', '.gif', '.webp']): - return True - # Check if it's from a known image hosting domain - if any(domain in url_lower for domain in ['imgur.com', 'i.imgur.com', 'redd.it', 'i.redd.it']): - return True + if self._is_gallery(submission): + return True # Check for self posts with media links if self._is_self(submission) and self._get_content(submission): @@ -252,7 +237,7 @@ Word Count: {word_count} try: if self._is_video(submission): return "video" - elif hasattr(submission, 'is_gallery') and submission.is_gallery: + elif self._is_gallery(submission): return "gallery" else: url = self._get_url(submission) diff --git a/src/umabot/rules/intelligent_roleplay_moderator.py b/src/umabot/rules/intelligent_roleplay_moderator.py index bd5a892..17298e0 100644 --- a/src/umabot/rules/intelligent_roleplay_moderator.py +++ b/src/umabot/rules/intelligent_roleplay_moderator.py @@ -122,7 +122,7 @@ class IntelligentRoleplayModerator(Rule, IntelligentModeratorBase): self.subreddit.modmail.create( subject=subject, body=message, - recipient=submission.author.name, + recipient=submission.author, author_hidden=True ) self.logger.info(f"Sent art flair change notification to {username}") @@ -151,7 +151,7 @@ class IntelligentRoleplayModerator(Rule, IntelligentModeratorBase): self.subreddit.modmail.create( subject=subject, body=message, - recipient=submission.author.name, + recipient=submission.author, author_hidden=True ) self.logger.info(f"Sent low-effort removal notification to {username}") |