Skip to content

Commit 6ab14b4

Browse files
committed
feat: distinguish AutoMod filter actions in display
- AutoMod removelink/removecomment now display as filter-removelink/filter-removecomment - Distinguishes automatic filters from manual moderator removals - Updated documentation with comprehensive action type descriptions - Enhanced wiki clarity while maintaining accurate database storage
1 parent 1670fd9 commit 6ab14b4

2 files changed

Lines changed: 15 additions & 2 deletions

File tree

CLAUDE.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,16 @@ The application supports both JSON config files and CLI arguments (CLI overrides
7272

7373
### Display Options
7474
- `anonymize_moderators`: Whether to show "HumanModerator" for human mods (default: true)
75-
- `true` (default): Shows "AutoMod", "Reddit", or "HumanModerator"
75+
- `true` (default): Shows "AutoModerator", "Reddit", or "HumanModerator"
7676
- `false`: Shows actual moderator usernames
7777

78+
### Action Types Displayed
79+
- **Manual Actions**: `removelink`, `removecomment`, `spamlink`, `spamcomment`
80+
- **AutoMod Filters**: `filter-removelink`, `filter-removecomment` (displayed when moderator is AutoModerator)
81+
- **Removal Reasons**: `addremovalreason` (combined with removal action when possible)
82+
- **Human Approvals**: `approvelink`, `approvecomment` (only for reversals of Reddit/AutoMod actions)
83+
- **Context**: Approval actions show original removal reason and moderator
84+
7885
### Database Features
7986
- **Multi-subreddit support**: Single database handles multiple subreddits safely
8087
- **Removal reason storage**: Full text/number handling from Reddit API
@@ -117,6 +124,8 @@ User profile links are a privacy concern and not useful for modlog purposes.
117124
- ✅ Added approval action tracking for `approvelink` and `approvecomment`
118125
- ✅ Smart filtering shows only approvals of Reddit/AutoMod removals in wiki
119126
- ✅ Combined display of removal actions with their associated removal reasons
127+
- ✅ AutoMod actions display as `filter-removelink`/`filter-removecomment` to distinguish from manual removals
128+
- ✅ Approval actions show original removal context: "Approved AutoModerator removal: [reason]"
120129
- ✅ Cleaner wiki presentation while maintaining full data integrity in database
121130

122131
## Previous Improvements (v2.1)

modlog_wiki_publisher.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -791,9 +791,13 @@ def format_modlog_entry(action, config: Dict[str, Any]) -> Dict[str, str]:
791791
if extracted_id:
792792
content_id = extracted_id.replace('t3_', '').replace('t1_', '')[:8]
793793

794+
display_action = action.action
795+
if action.action in ['removelink', 'removecomment'] and get_moderator_name(action, False) == 'AutoModerator':
796+
display_action = f"filter-{action.action}"
797+
794798
return {
795799
'time': get_action_datetime(action).strftime('%H:%M:%S UTC'),
796-
'action': action.action,
800+
'action': display_action,
797801
'id': content_id,
798802
'moderator': get_moderator_name(action, config.get('anonymize_moderators', True)) or 'Unknown',
799803
'content': format_content_link(action),

0 commit comments

Comments
 (0)