V2.1.1
This commit is contained in:
@@ -1,4 +1,13 @@
|
||||
# Changelog
|
||||
|
||||
## [2.1.1] - 2026-03-10
|
||||
|
||||
### Fixed
|
||||
- Prevented AttributeError in modqueue watcher and tag_post_watcher by checking for 'link_flair_text' only on Submission objects. This avoids errors when processing Comment objects.
|
||||
|
||||
### Changed
|
||||
- Updated logic in modqueue watcher and tag_post_watcher to safely handle both Submission and Comment objects.
|
||||
|
||||
## [2.1.0] - 2026-03-10
|
||||
|
||||
### Changed
|
||||
@@ -15,6 +24,8 @@
|
||||
- Added modqueue_watcher thread for independent modqueue processing.
|
||||
- Added debug print statements for modqueue post attributes and loop entry.
|
||||
|
||||
|
||||
|
||||
---
|
||||
## [V2 release]
|
||||
|
||||
|
||||
+5
-1
@@ -249,7 +249,7 @@ class ModReplyBot:
|
||||
try:
|
||||
# Check new submissions
|
||||
for submission in self.subreddit.stream.submissions(skip_existing=True):
|
||||
flair = (submission.link_flair_text or '').strip().lower()
|
||||
flair = (getattr(submission, 'link_flair_text', '') or '').strip().lower()
|
||||
title = submission.title.strip()
|
||||
import re
|
||||
title_tags = re.findall(r'\[(.*?)\]', title)
|
||||
@@ -288,7 +288,11 @@ class ModReplyBot:
|
||||
modqueue_posts = list(self.subreddit.mod.modqueue(limit=100))
|
||||
print(f"[MODQUEUE DEBUG] Fetched {len(modqueue_posts)} posts from modqueue.")
|
||||
for submission in modqueue_posts:
|
||||
# Only access link_flair_text if it's a Submission
|
||||
if hasattr(submission, 'link_flair_text'):
|
||||
flair = (submission.link_flair_text or '').strip().lower()
|
||||
else:
|
||||
flair = ''
|
||||
title = submission.title.strip()
|
||||
import re
|
||||
title_tags = re.findall(r'\[(.*?)\]', title)
|
||||
|
||||
Reference in New Issue
Block a user