remove annoying excalmation sign in notifs

pull/15/head
Aevann1 2022-11-25 23:50:21 +02:00
parent 7e403469cd
commit bf4031c832
5 changed files with 11 additions and 11 deletions

View File

@ -558,7 +558,7 @@ elif SITE == 'pcmemes.net':
AEVANN_ID = 1
SNAKES_ID = 2279
WELCOME_MSG = "Welcome to pcmemes.net! Don't forget to turn off the slur filter [here](/settings/content#slurreplacer)!"
WELCOME_MSG = "Welcome to pcmemes.net! Don't forget to turn off the slur filter [here](/settings/content#slurreplacer)"
LOTTERY_TICKET_COST = 12
LOTTERY_SINK_RATE = -8

View File

@ -1262,7 +1262,7 @@ def sticky_post(post_id, v):
pin_time = 'for 1 hour'
code = 200
if v.id != post.author_id:
send_repeatable_notification(post.author_id, f"@{v.username} (Admin) has pinned [{post.title}](/post/{post_id})!")
send_repeatable_notification(post.author_id, f"@{v.username} (Admin) has pinned [{post.title}](/post/{post_id})")
else:
if pins >= PIN_LIMIT + 1:
abort(403, f"Can't exceed {PIN_LIMIT} pinned posts limit!")
@ -1307,7 +1307,7 @@ def unsticky_post(post_id, v):
g.db.add(ma)
if v.id != post.author_id:
send_repeatable_notification(post.author_id, f"@{v.username} (Admin) has unpinned [{post.title}](/post/{post_id})!")
send_repeatable_notification(post.author_id, f"@{v.username} (Admin) has unpinned [{post.title}](/post/{post_id})")
cache.delete_memoized(frontlist)
return {"message": "Post unpinned!"}
@ -1329,7 +1329,7 @@ def sticky_comment(cid, v):
g.db.add(ma)
if v.id != comment.author_id:
message = f"@{v.username} (Admin) has pinned your [comment]({comment.shortlink})!"
message = f"@{v.username} (Admin) has pinned your [comment]({comment.shortlink})"
send_repeatable_notification(comment.author_id, message)
return {"message": "Comment pinned!"}
@ -1354,7 +1354,7 @@ def unsticky_comment(cid, v):
g.db.add(ma)
if v.id != comment.author_id:
message = f"@{v.username} (Admin) has unpinned your [comment]({comment.shortlink})!"
message = f"@{v.username} (Admin) has unpinned your [comment]({comment.shortlink})"
send_repeatable_notification(comment.author_id, message)
return {"message": "Comment unpinned!"}

View File

@ -514,8 +514,8 @@ def pin_comment(cid, v):
g.db.add(comment)
if v.id != comment.author_id:
if comment.post.ghost: message = f"OP has pinned your [comment]({comment.shortlink})!"
else: message = f"@{v.username} (OP) has pinned your [comment]({comment.shortlink})!"
if comment.post.ghost: message = f"OP has pinned your [comment]({comment.shortlink})"
else: message = f"@{v.username} (OP) has pinned your [comment]({comment.shortlink})"
send_repeatable_notification(comment.author_id, message)
return {"message": "Comment pinned!"}
@ -537,7 +537,7 @@ def unpin_comment(cid, v):
g.db.add(comment)
if v.id != comment.author_id:
message = f"@{v.username} (OP) has unpinned your [comment]({comment.shortlink})!"
message = f"@{v.username} (OP) has unpinned your [comment]({comment.shortlink})"
send_repeatable_notification(comment.author_id, message)
return {"message": "Comment unpinned!"}

View File

@ -113,7 +113,7 @@ def login_post():
def log_failed_admin_login_attempt(account:User, type:str):
if not account or account.admin_level < PERMS['SITE_WARN_ON_INVALID_AUTH']: return
ip = get_CF()
print(f"Admin user from {ip} failed to login to account @{account.user_name} (invalid {type})!")
print(f"Admin user from {ip} failed to login to account @{account.user_name} (invalid {type})")
try:
with open("/admin_failed_logins", "a+", encoding="utf-8") as f:
t = str(time.strftime("%d/%B/%Y %H:%M:%S UTC", time.gmtime(time.time())))

View File

@ -665,7 +665,7 @@ def mod_pin(cid, v):
g.db.add(ma)
if v.id != comment.author_id:
message = f"@{v.username} (/h/{comment.post.sub} Mod) has pinned your [comment]({comment.shortlink})!"
message = f"@{v.username} (/h/{comment.post.sub} Mod) has pinned your [comment]({comment.shortlink})"
send_repeatable_notification(comment.author_id, message)
return {"message": "Comment pinned!"}
@ -691,7 +691,7 @@ def mod_unpin(cid, v):
g.db.add(ma)
if v.id != comment.author_id:
message = f"@{v.username} (/h/{comment.post.sub} Mod) has unpinned your [comment]({comment.shortlink})!"
message = f"@{v.username} (/h/{comment.post.sub} Mod) has unpinned your [comment]({comment.shortlink})"
send_repeatable_notification(comment.author_id, message)
return {"message": "Comment unpinned!"}