diff --git a/files/assets/js/submit.js b/files/assets/js/submit.js index a58e2bd93..a082481ba 100644 --- a/files/assets/js/submit.js +++ b/files/assets/js/submit.js @@ -106,11 +106,15 @@ function autoSuggestTitle() { function ghost_toggle(t) { const followers = document.getElementById("post-notify") + const sub = document.getElementById("sub") if (t.checked == true) { followers.checked = false; followers.disabled = true; + sub.value = ''; + sub.disabled = true; } else { followers.disabled = false; + sub.disabled = false; } } diff --git a/files/routes/posts.py b/files/routes/posts.py index 20cf9b197..c47cfda89 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -585,6 +585,8 @@ def submit_post(v:User, sub=None): flag_private = request.values.get("private", False, bool) flag_ghost = request.values.get("ghost", False, bool) and v.can_post_in_ghost_threads + if flag_ghost: sub = None + if embed and len(embed) > 1500: embed = None if embed: embed = embed.strip() diff --git a/files/routes/reporting.py b/files/routes/reporting.py index 141d588b0..60cea9dae 100644 --- a/files/routes/reporting.py +++ b/files/routes/reporting.py @@ -158,6 +158,9 @@ def remove_report_comment(v, cid, uid): return {"message": "Report removed successfully!"} def move_post(post:Post, v:User, reason:str) -> Union[bool, str]: + if post.ghost: + return False + if not reason.startswith('/h/') and not reason.startswith('h/'): return False