Repository navigation
v1.41.0
Migrate:
require("community.schema").run_migrations(41)Due to the changes in how topics_count and posts_count is calculated it is recommend to recount all the community users: (Note this query may be expensive depending on your database, review the query in the code and plan accordingly)
require("community.models").CommunityUsers:recount()Additions
PendingPostsmodel is now ready for usetopic:post_needs_approval(user, post_data)method is called before creating a post in a topic to see if it should be created as a pending post insteadcategory:topic_needs_approval(user, post_data)method is called before creating topic in category to see if it should be created as pending post instead- instances of
PendingPostscan be promoted to real posts by thepromotemethod, which will delete thePendingPostafter successfully promoting it
- Module
community.versionnow returns the correct version - Add
purge_reportsmethod toCommunityUsersto clean up any reports made by that user
Changes
posts_countonCommunityUserswill now plainly count all posts created by that user that aren't soft-deleted or moderation events. Previously posts that were considered a topic post would not be counted.topics_countonCommunityUserswill no longer increment forpermanenttopics. (It's assumed permanent topics are not explicitly created by the user but implicitly exist for other objects eg. comments thread)purge_postsandpurge_votesmethods onCommunityUsersdeletes objects in batches and returned the total number of items removed- Fix error thrown where slug could not be generated for category tag name (such as emoji name)