mod actions: fix messages to use consistent format.
Fix mod actions to use the same message format everywhere. Before mod actions were formatted in various inconsistent ways: * "deleted post #1234" * "comment #1234 updated by <user>" * "<user> updated forum #1234" * "<user> level changed Member -> Builder" Now all mod actions consistently use this format: * "deleted post #1234" * "updated comment #1234" * "updated forum #1234" * "promoted <user> from Member to Builder" This way mod actions are formatted consistently with other actions on the /user_actions page, where everything is written as "<user> did X". Also add a fix script to fix existing mod actions.
This commit is contained in:
@@ -1462,7 +1462,7 @@ class Post < ApplicationRecord
|
||||
if category == "iqdb"
|
||||
update_iqdb
|
||||
|
||||
ModAction.log("<@#{user.name}> regenerated IQDB for post ##{id}", :post_regenerate_iqdb, user)
|
||||
ModAction.log("regenerated IQDB for post ##{id}", :post_regenerate_iqdb, user)
|
||||
else
|
||||
media_file = media_asset.variant(:original).open_file
|
||||
media_asset.distribute_files!(media_file)
|
||||
@@ -1484,7 +1484,7 @@ class Post < ApplicationRecord
|
||||
purge_cached_urls!
|
||||
update_iqdb
|
||||
|
||||
ModAction.log("<@#{user.name}> regenerated image samples for post ##{id}", :post_regenerate, user)
|
||||
ModAction.log("regenerated image samples for post ##{id}", :post_regenerate, user)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user