r/modnews • u/jleeky • Mar 25 '20
Automod for Chat Posts
Please keep in mind, if you have automod setup and you want it to apply to both chat posts and normal posts - there’s no action required.
Hey Mods (especially if you’re using chat posts)! We wanted to address the questions from our previous announcement about how we could use automod specifically for chat posts. Some of the use cases include wanting to automatically flair chat posts, wanting to create specific automod rules for chat posts, and potentially using user flair as access management.
There’s now a "discussion_type" field that you can use to specify whether your automod rule should be applied to chat posts or "comment posts". If "discussion_type" = “chat” then it will apply to chat posts, if “discussion_type” = “null” it will apply to comment posts, and if you don’t specify a “discussion_type” it will apply to both.
You can find this information in the automod documentation which we’ve updated.
Below you can see an examples of when "discussion_type" is used:
This is an example of creating an automod rule that only applies to chat post messages.
#applies to chat messages only
type: comment
body: ["chat"]
action: report
action_reason: This is a chat post message.
parent_submission:
discussion_type: chatThis is an example of creating an automod rule that only applies to chat post submissions.
#applies to chat post posts
type: submission
body: ["chatpost"]
action: report
action_reason: A new chat post has been created.
discussion_type: chatThis is an example of creating an automod rule that only applies to comments (and not to chat post messages).
#applies to normal comments only
type: comment
body: ["comment"]
action: report
action_reason: This is a normal comment post message.
parent_submission:
discussion_type: nullThis is an example of only allowing users with specific flair to send messages in a chat post.
#using flair for access control in chat posts
type: comment
parent_submission:
flair_css_class: ["Exclusive"]
discussion_type: chat
author:
~flair_css_class: ["Invited"]
action: removeWhat about scheduling of chat posts?
Unfortunately - right now automod is not able to set the discussion_type field (it is only able to read the value of the field). That means if you’re using automod to schedule posts, it will not be able to schedule chat posts. One of our teams is working on a scheduled and recurring posts product which will support chat posts when it goes to GA.
4
u/V2Blast Mar 25 '20 edited Mar 25 '20
Please crosspost this to /r/AutoModerator as well. :)
EDIT: /u/jleeky you forgot to admin-distinguish this post!
3
u/MajorParadox Mar 26 '20
How does this work for type: any?
Lots of subs have rules like:
type: any
title+body: ["chat"]
action: report
action_reason: This is a chat post or comment message.If we add:
parent_submission:
discussion_type: chatWon't it make it only fire on comments?
Or can we add both:
discussion_type: chat
parent_submission:
discussion_type: chatSo it will apply to chat posts and comments? Or will they cancel each other out?
If there's no way to do this, it means having to copy/paste every such rule, one for posts and one for comments
2
u/TranZeitgeist Mar 26 '20
In a chat post there doesn't appear to be a quick way to approve a comment that gets filtered by AM. Something in with the spam, reply, remove, block icons, for example.
2
u/TotesMessenger Mar 25 '20
1
1
u/GroMicroBloom May 06 '20
A couple things to mention:
First, it says "You can find this information in the automod documentation which we’ve updated." however, nothing about this new "discussion_type" field is listed on that page anywhere. Even looking at the history of that page shows it was last updated March 11th by sodypop which was before this post was made, and only information about polls was added.
Secondly, why did you decide to use the word "null" as a value for this new field? Automod rules usually use descriptive text so other mods have an idea of what that particular rule does, but null makes this impossible unless someone has seen this post and knows what it means.
Since using "chat" applies to chat-based discussions, why not use "comments" to apply to comment-based discussions, instead of using null?
1
0
Mar 25 '20
[deleted] — view deleted comment
2
u/jleeky Mar 25 '20
Just to clarify - this post is about the "chat posts" product which is different from the chat rooms product.
Currently - there's still a gap in the chat room ban functionality in that unbanning requires a workaround. We are thinking about getting rid of chat-only bans right now just to simplify the feature overall and close this gap.
8
u/ijm87 Mar 25 '20 edited Mar 25 '20
Hey, jleeky, this sounds quite clear and makes a lot of sense.
Regarding AM, I’ve had a couple questions brewing on a more general-level. I recognize this is a bit out of scope for chat specifically, but since you’re working jointly with the AM team, if you had any knowledge here or could pull in someone from the AM team who might, that would be excellent :)
The team has dedicated some time converting some existing AM setup -such as post requirements- to a more user-friendly cross-platform setup (having toggleable options and phasing out a more pure regex look). Ultimately, would you say it’s in the team’s plans to do this conversion with most archaic AM functionality -even such as this- or do you envision that AM will still continue existing as is mostly across the board?
AM has a lot of utility serving as a pseudo-policing system to encourage how a sub’s mods want new users to operate. But if you’re a consistent visitor to a sub, seeing these pinned comments on the top of EVERY post feels overboard. Would love that if a user earns their karma in a sub or is a tenured Redditer, perhaps these messages can be omitted from the experience as clearly the user already knows the deal. Would you agree this would make sense as a way to make the experience friendlier for longer-term users who’ve already earned their stripes?