Skip to content

Commit d16e916

Browse files
bakerboy448claude
andcommitted
Fix removal reason display to show actual text instead of generic message
Changes action.description to action.details (Reddit API field) and updates logic to only show generic message for removal reason template numbers 1-15, allowing actual removal reason text to display properly. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 3949ec3 commit d16e916

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

modlog_wiki_publisher.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -474,11 +474,11 @@ def store_processed_action(action, subreddit_name=None):
474474
if hasattr(action, 'mod_note') and action.mod_note:
475475
removal_reason = censor_email_addresses(str(action.mod_note).strip())
476476
# Second priority: details (accept all non-empty details text)
477-
elif hasattr(action, 'description') and action.description:
478-
details_str = str(action.description).strip()
479-
# Only show generic message for purely numeric details that are likely IDs
480-
if details_str.isdigit() and len(details_str) > 6:
481-
removal_reason = f"ModLog description appears as a numeric id? [{details_str}]. A Removal reason was applied"
477+
elif hasattr(action, 'details') and action.details:
478+
details_str = str(action.details).strip()
479+
# Only show generic message for removal reason template numbers (1-15)
480+
if details_str.isdigit() and 1 <= int(details_str) <= 15:
481+
removal_reason = "Removal reason applied"
482482
else:
483483
removal_reason = censor_email_addresses(details_str)
484484

0 commit comments

Comments
 (0)