Skip to content

Commit 1769052

Browse files
bakerboy448claude
andcommitted
fix: addremovalreason actions now show actual removal reason text instead of template numbers
- For addremovalreason actions, use description field which contains actual text like 'Invites - No asking' - Fixes template numbers (6, 9, etc) showing instead of meaningful removal reasons - Maintains existing logic for other action types using mod_note and details fields - Improves removal reason transparency for manual moderator actions 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 74cdc40 commit 1769052

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

modlog_wiki_publisher.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -467,11 +467,14 @@ def store_processed_action(action, subreddit_name=None):
467467
conn = sqlite3.connect(DB_PATH)
468468
cursor = conn.cursor()
469469

470-
# Process removal reason properly - ALWAYS prefer mod_note over numeric details
470+
# Process removal reason properly - ALWAYS prefer actual text over numeric details
471471
removal_reason = None
472472

473+
# For addremovalreason actions, use description field (contains actual text)
474+
if action.action == 'addremovalreason' and hasattr(action, 'description') and action.description:
475+
removal_reason = censor_email_addresses(str(action.description).strip())
473476
# First priority: mod_note (actual removal reason text)
474-
if hasattr(action, 'mod_note') and action.mod_note:
477+
elif hasattr(action, 'mod_note') and action.mod_note:
475478
removal_reason = censor_email_addresses(str(action.mod_note).strip())
476479
# Second priority: details (accept ALL details text, including numbers)
477480
elif hasattr(action, 'details') and action.details:

0 commit comments

Comments
 (0)