I ended up creating a workaround using a couple different tools (my coding is not strong enough to build a custom plugin!). It tested fine and works.
- created a new group,
restricted-users - created a custom wizard form, restricted to the moderators group
- created a new category only viewable to mods,
restricted-users-adminand replaced the composer with the custom wizard form. - when a user should have their posting ability limited, a mod fills out the custom wizard form. The form asks which user should be added to the group, and what date they should be removed.
- submitting the form creates a new topic in
restricted-users-admin - created a webhook for this category to send any new topic created.
- when the webhook is received, first check if the user is already in the group, and create a post reply with that info if so. If the user is not in the group, add them to the group, then wait until the given end date/time, then remove them from the group.
- created a webhook for any posts by users in the
restricted-usersgroup. - when the restricted user posts and the webhook is sent, make an api call to determine how many posts the user has made that day (used same day instead of a 24 hr period, figured it was just easier to match the date I guess). I filtered out PMs here.
- if it’s the next to last post the user has available, the API sends the user a PM letting them know they’re approaching their limit and have one more post today. As a proof of concept I set the limit at 5 posts, so this sends a PM after the user’s 4th post.
- if it’s their last post, the API silences the user for 24 hours.
- When the user is removed from the
restricted-usersgroup, the API sends a post reply to the original topic in therestricted-users-admincategory.
This is edge case territory for us - this is a “next-to-last resort” kind of thing, after a lot of communication and moderators working with the user. I don’t anticipate we will have the kind of traffic on this that it becomes burdensome, this is a teeny teeny tiny number of users. We are a membership organization and our Discourse forum serves as a repository for all kinds of resources, so members ought to be able to access it. Hence, we need to come up with different solutions rather than suspending.