forked from rDrama/rDrama
use default config vlaue const everywhere
parent
adf22b494a
commit
3d7737387c
|
@ -103,7 +103,7 @@ def NOTIFY_USERS(text, v):
|
||||||
|
|
||||||
return notify_users - bots
|
return notify_users - bots
|
||||||
|
|
||||||
if PUSHER_ID != 'blahblahblah':
|
if PUSHER_ID != DEFAULT_CONFIG_VALUE:
|
||||||
beams_client = PushNotifications(instance_id=PUSHER_ID, secret_key=PUSHER_KEY)
|
beams_client = PushNotifications(instance_id=PUSHER_ID, secret_key=PUSHER_KEY)
|
||||||
|
|
||||||
def pusher_thread(interests, title, notifbody, url):
|
def pusher_thread(interests, title, notifbody, url):
|
||||||
|
|
|
@ -455,8 +455,8 @@ LEADERBOARD_LIMIT = PAGE_SIZE
|
||||||
HOUSE_JOIN_COST = 500
|
HOUSE_JOIN_COST = 500
|
||||||
HOUSE_SWITCH_COST = 2000
|
HOUSE_SWITCH_COST = 2000
|
||||||
|
|
||||||
DONATE_SERVICE = "Gumroad" if not KOFI_TOKEN or KOFI_TOKEN == 'blahblahblah' else "KoFi"
|
DONATE_SERVICE = "Gumroad" if not KOFI_TOKEN or KOFI_TOKEN == DEFAULT_CONFIG_VALUE else "KoFi"
|
||||||
DONATE_LINK = GUMROAD_LINK if not KOFI_TOKEN or KOFI_TOKEN == 'blahblahblah' else KOFI_LINK
|
DONATE_LINK = GUMROAD_LINK if not KOFI_TOKEN or KOFI_TOKEN == DEFAULT_CONFIG_VALUE else KOFI_LINK
|
||||||
|
|
||||||
TIERS_ID_TO_NAME = {
|
TIERS_ID_TO_NAME = {
|
||||||
1: "Paypig",
|
1: "Paypig",
|
||||||
|
|
|
@ -9,7 +9,7 @@ from urllib.parse import quote
|
||||||
from flask import render_template
|
from flask import render_template
|
||||||
|
|
||||||
def send_mail(to_address, subject, html):
|
def send_mail(to_address, subject, html):
|
||||||
if MAILGUN_KEY == 'blahblahblah': return
|
if MAILGUN_KEY == DEFAULT_CONFIG_VALUE: return
|
||||||
url = f"https://api.mailgun.net/v3/{SITE}/messages"
|
url = f"https://api.mailgun.net/v3/{SITE}/messages"
|
||||||
auth = ("api", MAILGUN_KEY)
|
auth = ("api", MAILGUN_KEY)
|
||||||
data = {"from": EMAIL,
|
data = {"from": EMAIL,
|
||||||
|
|
|
@ -316,7 +316,7 @@ def comment(v):
|
||||||
n = Notification(comment_id=c.id, user_id=x)
|
n = Notification(comment_id=c.id, user_id=x)
|
||||||
g.db.add(n)
|
g.db.add(n)
|
||||||
|
|
||||||
if parent.author.id != v.id and PUSHER_ID != 'blahblahblah' and not v.shadowbanned:
|
if parent.author.id != v.id and PUSHER_ID != DEFAULT_CONFIG_VALUE and not v.shadowbanned:
|
||||||
interests = f'{SITE}{parent.author.id}'
|
interests = f'{SITE}{parent.author.id}'
|
||||||
|
|
||||||
title = f'New reply by @{c.author_name}'
|
title = f'New reply by @{c.author_name}'
|
||||||
|
|
|
@ -64,5 +64,6 @@ def inject_constants():
|
||||||
"DONATE_LINK":DONATE_LINK, "DONATE_SERVICE":DONATE_SERVICE, "BAN_EVASION_DOMAIN":BAN_EVASION_DOMAIN,
|
"DONATE_LINK":DONATE_LINK, "DONATE_SERVICE":DONATE_SERVICE, "BAN_EVASION_DOMAIN":BAN_EVASION_DOMAIN,
|
||||||
"HOUSE_JOIN_COST":HOUSE_JOIN_COST, "HOUSE_SWITCH_COST":HOUSE_SWITCH_COST, "IMAGE_FORMATS":IMAGE_FORMATS,
|
"HOUSE_JOIN_COST":HOUSE_JOIN_COST, "HOUSE_SWITCH_COST":HOUSE_SWITCH_COST, "IMAGE_FORMATS":IMAGE_FORMATS,
|
||||||
"PAGE_SIZES":PAGE_SIZES, "THEMES":THEMES, "COMMENT_SORTS":COMMENT_SORTS, "SORTS":SORTS,
|
"PAGE_SIZES":PAGE_SIZES, "THEMES":THEMES, "COMMENT_SORTS":COMMENT_SORTS, "SORTS":SORTS,
|
||||||
"TIME_FILTERS":TIME_FILTERS, "HOUSES":HOUSES, "TIERS_ID_TO_NAME":TIERS_ID_TO_NAME,
|
"TIME_FILTERS":TIME_FILTERS, "HOUSES":HOUSES, "TIERS_ID_TO_NAME":TIERS_ID_TO_NAME,
|
||||||
|
"DEFAULT_CONFIG_VALUE":DEFAULT_CONFIG_VALUE
|
||||||
}
|
}
|
||||||
|
|
|
@ -252,7 +252,7 @@ def sign_up_post(v):
|
||||||
if existing_account:
|
if existing_account:
|
||||||
return signup_error("An account with that username already exists.")
|
return signup_error("An account with that username already exists.")
|
||||||
|
|
||||||
if TURNSTILE_SITEKEY != 'blahblahblah':
|
if TURNSTILE_SITEKEY != DEFAULT_CONFIG_VALUE:
|
||||||
token = request.values.get("cf-turnstile-response")
|
token = request.values.get("cf-turnstile-response")
|
||||||
if not token:
|
if not token:
|
||||||
return signup_error("Unable to verify captcha [1].")
|
return signup_error("Unable to verify captcha [1].")
|
||||||
|
|
|
@ -461,7 +461,7 @@ def message2(v, username):
|
||||||
g.db.add(notif)
|
g.db.add(notif)
|
||||||
|
|
||||||
|
|
||||||
if PUSHER_ID != 'blahblahblah' and not v.shadowbanned:
|
if PUSHER_ID != DEFAULT_CONFIG_VALUE and not v.shadowbanned:
|
||||||
interests = f'{SITE}{user.id}'
|
interests = f'{SITE}{user.id}'
|
||||||
|
|
||||||
title = f'New message from @{username}'
|
title = f'New message from @{username}'
|
||||||
|
@ -534,7 +534,7 @@ def messagereply(v):
|
||||||
notif = Notification(comment_id=c.id, user_id=user_id)
|
notif = Notification(comment_id=c.id, user_id=user_id)
|
||||||
g.db.add(notif)
|
g.db.add(notif)
|
||||||
|
|
||||||
if PUSHER_ID != 'blahblahblah' and not v.shadowbanned:
|
if PUSHER_ID != DEFAULT_CONFIG_VALUE and not v.shadowbanned:
|
||||||
interests = f'{SITE}{user_id}'
|
interests = f'{SITE}{user_id}'
|
||||||
|
|
||||||
title = f'New message from @{v.username}'
|
title = f'New message from @{v.username}'
|
||||||
|
|
|
@ -254,7 +254,7 @@
|
||||||
|
|
||||||
<a class="dropdown-item" rel="nofollow noopener" href="https://rdrama.net/post/18459"><i class="fas fa-bug fa-fw mr-3"></i>Bugs/Suggestions</a>
|
<a class="dropdown-item" rel="nofollow noopener" href="https://rdrama.net/post/18459"><i class="fas fa-bug fa-fw mr-3"></i>Bugs/Suggestions</a>
|
||||||
|
|
||||||
{% if TELEGRAM_LINK != 'blahblahblah' %}
|
{% if TELEGRAM_LINK != DEFAULT_CONFIG_VALUE %}
|
||||||
<a rel="nofollow noopener" class="dropdown-item" href="{{TELEGRAM_LINK}}"><i class="fab fa-telegram fa-fw mr-3"></i>Telegram Channel</a>
|
<a rel="nofollow noopener" class="dropdown-item" href="{{TELEGRAM_LINK}}"><i class="fab fa-telegram fa-fw mr-3"></i>Telegram Channel</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
@ -321,7 +321,7 @@
|
||||||
|
|
||||||
<a class="nav-item nav-link" rel="nofollow noopener" href="https://rdrama.net/post/18459"><i class="fas fa-bug fa-fw mr-3"></i>Bugs/Suggestions</a>
|
<a class="nav-item nav-link" rel="nofollow noopener" href="https://rdrama.net/post/18459"><i class="fas fa-bug fa-fw mr-3"></i>Bugs/Suggestions</a>
|
||||||
|
|
||||||
{% if TELEGRAM_LINK != 'blahblahblah' %}
|
{% if TELEGRAM_LINK != DEFAULT_CONFIG_VALUE %}
|
||||||
<a rel="nofollow noopener" class="nav-item nav-link" href="{{TELEGRAM_LINK}}"><i class="fab fa-telegram fa-fw mr-3"></i>Telegram Channel</a>
|
<a rel="nofollow noopener" class="nav-item nav-link" href="{{TELEGRAM_LINK}}"><i class="fab fa-telegram fa-fw mr-3"></i>Telegram Channel</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
|
@ -173,7 +173,7 @@
|
||||||
</nav>
|
</nav>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if request.path == '/' and PUSHER_ID != 'blahblahblah' and v %}
|
{% if request.path == '/' and PUSHER_ID != DEFAULT_CONFIG_VALUE and v %}
|
||||||
<div class="d-none" id="strid">{{SITE}}{{v.id}}</div>
|
<div class="d-none" id="strid">{{SITE}}{{v.id}}</div>
|
||||||
<div class="d-none" id="pusherid">{{PUSHER_ID}}</div>
|
<div class="d-none" id="pusherid">{{PUSHER_ID}}</div>
|
||||||
<script defer src="{{'js/pusher.js' | asset}}"></script>
|
<script defer src="{{'js/pusher.js' | asset}}"></script>
|
||||||
|
|
|
@ -100,7 +100,7 @@
|
||||||
<label class="custom-control-label terms" for="termsCheck">I accept the <a href="/sidebar">rules</a></label>
|
<label class="custom-control-label terms" for="termsCheck">I accept the <a href="/sidebar">rules</a></label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% if turnstile != 'blahblahblah' %}
|
{% if turnstile != DEFAULT_CONFIG_VALUE %}
|
||||||
<div class="cf-turnstile" data-sitekey="{{turnstile}}"></div>
|
<div class="cf-turnstile" data-sitekey="{{turnstile}}"></div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
@ -130,7 +130,7 @@
|
||||||
|
|
||||||
<script defer src="{{'js/signup.js' | asset}}"></script>
|
<script defer src="{{'js/signup.js' | asset}}"></script>
|
||||||
|
|
||||||
{% if turnstile != 'blahblahblah' %}
|
{% if turnstile != DEFAULT_CONFIG_VALUE %}
|
||||||
<script defer src="https://challenges.cloudflare.com/turnstile/v0/api.js"></script>
|
<script defer src="https://challenges.cloudflare.com/turnstile/v0/api.js"></script>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue