fix images in modmail
parent
a2d8bcf6ab
commit
cd573133a9
|
@ -267,6 +267,8 @@ def process_dm_images(v, user):
|
|||
|
||||
if body:
|
||||
with open(f"{LOG_DIRECTORY}/dm_images.log", "a+", encoding="utf-8") as f:
|
||||
if user:
|
||||
f.write(f'{body.strip()}, {v.username}, {v.id}, {user.username}, {user.id}\n')
|
||||
|
||||
else:
|
||||
f.write(f'{body.strip()}, {v.username}, {v.id}, Modmail, Modmail\n')
|
||||
return body
|
||||
|
|
|
@ -557,6 +557,8 @@ def messagereply(v:User):
|
|||
if parent.sentto == MODMAIL_ID: user_id = None
|
||||
elif v.id == user_id: user_id = parent.sentto
|
||||
|
||||
user = None
|
||||
|
||||
if user_id:
|
||||
user = get_account(user_id, v=v, include_blocks=True)
|
||||
if hasattr(user, 'is_blocking') and user.is_blocking:
|
||||
|
|
|
@ -31,11 +31,15 @@
|
|||
</td>
|
||||
<td>
|
||||
{% if item[1] != "Unknown" %}
|
||||
{% if item[3] == "Modmail" %}
|
||||
Modmail
|
||||
{% else %}
|
||||
<a href="/id/{{item[4]}}">
|
||||
<img loading="lazy" src="/pp/{{item[4]}}">
|
||||
@{{item[3]}}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
|
Loading…
Reference in New Issue