forked from rDrama/rDrama
Merge branch 'master' into mistletoe
commit
6d23ef966a
|
@ -418,7 +418,7 @@ class User(Base):
|
|||
@property
|
||||
@lazy
|
||||
def profile_url(self):
|
||||
if self.agendaposter: return f"http://{site}/assets/images/defaultpictures/agendaposter/{random.randint(1, 15)}.webp?v=1"
|
||||
if self.agendaposter: return f"http://{site}/assets/images/defaultpictures/agendaposter/{random.randint(1, 50)}.webp?v=1"
|
||||
if self.profileurl: return self.profileurl
|
||||
if "rama" in site: return f"http://{site}/assets/images/defaultpictures/{random.randint(1, 150)}.webp?v=1"
|
||||
return f"http://{site}/assets/images/default-profile-pic.webp"
|
||||
|
|
|
@ -197,8 +197,8 @@ def api_comment(v):
|
|||
|
||||
if v.agendaposter:
|
||||
for k, l in AJ_REPLACEMENTS.items(): body = body.replace(k, l)
|
||||
body = body.replace('I ', f'@{v.username}')
|
||||
body = censor_slurs2(body).upper().replace(' ME ', f'@{v.username}')
|
||||
body = body.replace('I ', f'@{v.username} ')
|
||||
body = censor_slurs2(body).upper().replace(' ME ', f' @{v.username} ')
|
||||
|
||||
body_html = sanitize(CustomRenderer().render(mistletoe.Document(body)))
|
||||
|
||||
|
@ -651,8 +651,8 @@ def edit_comment(cid, v):
|
|||
|
||||
if v.agendaposter:
|
||||
for k, l in AJ_REPLACEMENTS.items(): body = body.replace(k, l)
|
||||
body = body.replace('I ', f'@{v.username}')
|
||||
body = censor_slurs2(body).upper().replace(' ME ', f'@{v.username}')
|
||||
body = body.replace('I ', f'@{v.username} ')
|
||||
body = censor_slurs2(body).upper().replace(' ME ', f' @{v.username} ')
|
||||
|
||||
body_html = sanitize(CustomRenderer().render(mistletoe.Document(body)))
|
||||
|
||||
|
|
|
@ -251,8 +251,8 @@ def edit_post(pid, v):
|
|||
if title != p.title:
|
||||
if v.agendaposter:
|
||||
for k, l in AJ_REPLACEMENTS.items(): title = title.replace(k, l)
|
||||
title = title.replace('I ', f'@{v.username}')
|
||||
title = censor_slurs2(title).upper().replace(' ME ', f'@{v.username}')
|
||||
title = title.replace('I ', f'@{v.username} ')
|
||||
title = censor_slurs2(title).upper().replace(' ME ', f' @{v.username} ')
|
||||
|
||||
title_html = filter_title(title)
|
||||
if v.marseyawarded and len(list(re.finditer('>[^<\s+]|[^>\s+]<', title_html))) > 0: return {"error":"You can only type marseys!"}, 403
|
||||
|
@ -265,8 +265,8 @@ def edit_post(pid, v):
|
|||
|
||||
if v.agendaposter:
|
||||
for k, l in AJ_REPLACEMENTS.items(): body = body.replace(k, l)
|
||||
body = body.replace('I ', f'@{v.username}')
|
||||
body = censor_slurs2(body).upper().replace(' ME ', f'@{v.username}')
|
||||
body = body.replace('I ', f'@{v.username} ')
|
||||
body = censor_slurs2(body).upper().replace(' ME ', f' @{v.username} ')
|
||||
|
||||
body_html = sanitize(CustomRenderer().render(mistletoe.Document(body)))
|
||||
|
||||
|
@ -548,8 +548,8 @@ def submit_post(v):
|
|||
|
||||
if v.agendaposter:
|
||||
for k, l in AJ_REPLACEMENTS.items(): title = title.replace(k, l)
|
||||
title = title.replace('I ', f'@{v.username}')
|
||||
title = censor_slurs2(title).upper().replace(' ME ', f'@{v.username}')
|
||||
title = title.replace('I ', f'@{v.username} ')
|
||||
title = censor_slurs2(title).upper().replace(' ME ', f' @{v.username} ')
|
||||
|
||||
title_html = filter_title(title)
|
||||
body = request.values.get("body", "").strip()
|
||||
|
@ -732,8 +732,8 @@ def submit_post(v):
|
|||
|
||||
if v.agendaposter:
|
||||
for k, l in AJ_REPLACEMENTS.items(): body = body.replace(k, l)
|
||||
body = body.replace('I ', f'@{v.username}')
|
||||
body = censor_slurs2(body).upper().replace(' ME ', f'@{v.username}')
|
||||
body = body.replace('I ', f'@{v.username} ')
|
||||
body = censor_slurs2(body).upper().replace(' ME ', f' @{v.username} ')
|
||||
|
||||
body_html = sanitize(CustomRenderer().render(mistletoe.Document(body)))
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
<td style="font-weight: bold">{{loop.index}}</td>
|
||||
<td><a style="color:#{{user.namecolor}}; font-weight:bold;" href="/@{{user.username}}"><img loading="lazy" src="/uid/{{user.id}}/pic" class="pp20"><span {% if user.patron %}class="patron" style="background-color:#{{user.namecolor}};"{% endif %}>{{user.username}}</span></a></td>
|
||||
{% if v.id == u.id %}
|
||||
<td><div class="btn btn-danger" onclick="removeFollower(event, '{{user.username}}')">Remove follow</div></td>
|
||||
<td><div class="btn btn-danger pr-2" onclick="removeFollower(event, '{{user.username}}')">Remove follow</div></td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
|
Loading…
Reference in New Issue