forked from rDrama/rDrama
disable ghost-posting in holes to prevent hole jannies from unmaking ppl who participate in them
parent
3cbea18327
commit
aaa618657f
|
@ -106,11 +106,15 @@ function autoSuggestTitle() {
|
||||||
|
|
||||||
function ghost_toggle(t) {
|
function ghost_toggle(t) {
|
||||||
const followers = document.getElementById("post-notify")
|
const followers = document.getElementById("post-notify")
|
||||||
|
const sub = document.getElementById("sub")
|
||||||
if (t.checked == true) {
|
if (t.checked == true) {
|
||||||
followers.checked = false;
|
followers.checked = false;
|
||||||
followers.disabled = true;
|
followers.disabled = true;
|
||||||
|
sub.value = '';
|
||||||
|
sub.disabled = true;
|
||||||
} else {
|
} else {
|
||||||
followers.disabled = false;
|
followers.disabled = false;
|
||||||
|
sub.disabled = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -585,6 +585,8 @@ def submit_post(v:User, sub=None):
|
||||||
flag_private = request.values.get("private", False, bool)
|
flag_private = request.values.get("private", False, bool)
|
||||||
flag_ghost = request.values.get("ghost", False, bool) and v.can_post_in_ghost_threads
|
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 and len(embed) > 1500: embed = None
|
||||||
if embed: embed = embed.strip()
|
if embed: embed = embed.strip()
|
||||||
|
|
||||||
|
|
|
@ -158,6 +158,9 @@ def remove_report_comment(v, cid, uid):
|
||||||
return {"message": "Report removed successfully!"}
|
return {"message": "Report removed successfully!"}
|
||||||
|
|
||||||
def move_post(post:Post, v:User, reason:str) -> Union[bool, str]:
|
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/'):
|
if not reason.startswith('/h/') and not reason.startswith('h/'):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue