rename 2 modactions

master
Aevann 2023-08-04 00:07:57 +03:00
parent fbfb2dc8ed
commit 05c04979ed
3 changed files with 7 additions and 5 deletions

View File

@ -191,12 +191,12 @@ MODACTION_TYPES = {
"icon": 'fa-user-crown',
"color": 'bg-success'
},
'mod_mute_user': {
'mute_user': {
"str": 'muted reports from {self.target_link}',
"icon": 'fa-file-signature',
"color": 'bg-danger'
},
'mod_unmute_user': {
'unmute_user': {
"str": 'unmuted reports from {self.target_link}',
"icon": 'fa-file-signature',
"color": 'bg-success'
@ -412,7 +412,7 @@ MODACTION_TYPES = dict(sorted(MODACTION_TYPES.items()))
MODACTION_PRIVILEGED_TYPES = {
'shadowban', 'unshadowban',
'mod_mute_user', 'mod_unmute_user',
'mute_user', 'unmute_user',
'link_accounts', 'delink_accounts',
'progstack_post', 'progstack_comment',
'unprogstack_post', 'unprogstack_comment'

View File

@ -1238,7 +1238,7 @@ def mute_user(v, user_id):
if not user.is_muted:
user.is_muted = True
ma = ModAction(
kind='mod_mute_user',
kind='mute_user',
user_id=v.id,
target_user_id=user.id,
)
@ -1261,7 +1261,7 @@ def unmute_user(v, user_id):
if user.is_muted:
user.is_muted = False
ma = ModAction(
kind='mod_unmute_user',
kind='unmute_user',
user_id=v.id,
target_user_id=user.id,
)

View File

@ -0,0 +1,2 @@
update modactions set kind='mute_user' where kind='mod_mute_user';
update modactions set kind='unmute_user' where kind='mod_unmute_user';