gfd
This commit is contained in:
parent
c607b17a88
commit
0c83fa44e3
2 changed files with 5 additions and 5 deletions
|
@ -43,7 +43,7 @@ class ModAction(Base, Stndrd, Age_times):
|
|||
@property
|
||||
def note(self):
|
||||
|
||||
if self.kind=="exile_user":
|
||||
if self.kind=="ban_user":
|
||||
if self.target_post:
|
||||
return f'for <a href="{self.target_post.permalink}">post</a>'
|
||||
elif self.target_comment:
|
||||
|
@ -142,13 +142,13 @@ ACTIONTYPES={
|
|||
"color": "bg-muted",
|
||||
"title": 'yanked post {self.target_post.title}'
|
||||
},
|
||||
"exile_user":{
|
||||
"ban_user":{
|
||||
"str":'banned user {self.target_link}',
|
||||
"icon":"fa-user-slash",
|
||||
"color": "bg-danger",
|
||||
"title": 'banned user {self.target_user.username}'
|
||||
},
|
||||
"unexile_user":{
|
||||
"unban_user":{
|
||||
"str":'unbanned user {self.target_link}',
|
||||
"icon": "fa-user-slash",
|
||||
"color": "bg-muted",
|
||||
|
|
|
@ -888,7 +888,7 @@ def ban_user(user_id, v):
|
|||
elif days == 1: duration = "1 day"
|
||||
else: duration = f"{days} days"
|
||||
ma=ModAction(
|
||||
kind="exile_user",
|
||||
kind="ban_user",
|
||||
user_id=v.id,
|
||||
target_user_id=user.id,
|
||||
note=f'reason: "{reason}", duration: {duration}'
|
||||
|
@ -934,7 +934,7 @@ def unban_user(user_id, v):
|
|||
"Your account has been reinstated. Please carefully review and abide by the [rules](/post/2510) to ensure that you don't get suspended again.")
|
||||
|
||||
ma=ModAction(
|
||||
kind="unexile_user",
|
||||
kind="unban_user",
|
||||
user_id=v.id,
|
||||
target_user_id=user.id,
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue