diff --git a/files/helpers/config/subaction_types.py b/files/helpers/config/subaction_types.py index a3df3d247..4d7dbefaa 100644 --- a/files/helpers/config/subaction_types.py +++ b/files/helpers/config/subaction_types.py @@ -24,10 +24,10 @@ SUBACTION_TYPES = { "icon": 'fa-feather-alt', "color": 'bg-danger' }, - 'move_chudrama': { - "str": 'moved post {self.target_link} to /h/chudrama', - "icon": 'fa-feather-alt', - "color": 'bg-danger' + 'move_hole': { + "str": 'changed hole of {self.target_link}', + "icon": 'fa-manhole', + "color": 'bg-primary' }, 'flair_post': { "str": 'set a flair on {self.target_link}', diff --git a/files/routes/reporting.py b/files/routes/reporting.py index 7b3b1fa87..b5eb028e9 100644 --- a/files/routes/reporting.py +++ b/files/routes/reporting.py @@ -181,11 +181,12 @@ def move_post(post:Submission, v:User, reason:str) -> Union[bool, str]: g.db.add(post) if v.id != post.author_id: + sub_from_str = 'main feed' if sub_from is None else \ + f'/h/{sub_from}' + sub_to_str = 'main feed' if sub_to is None else \ + f'/h/{sub_to}' + if v.admin_level: - sub_from_str = 'main feed' if sub_from is None else \ - f'/h/{sub_from}' - sub_to_str = 'main feed' if sub_to is None else \ - f'/h/{sub_to}' ma = ModAction( kind='move_hole', user_id=v.id, @@ -199,9 +200,10 @@ def move_post(post:Submission, v:User, reason:str) -> Union[bool, str]: else: ma = SubAction( sub=sub_from, - kind='move_chudrama', + kind='move_hole', user_id=v.id, - target_submission_id=post.id + target_submission_id=post.id, + _note=f'{sub_from_str} → {sub_to_str}', ) g.db.add(ma)