improve DMs + add rebuild script
parent
869ed215a3
commit
7cb1f8196e
|
@ -587,9 +587,11 @@ async def admin_direct_messages(
|
|||
)
|
||||
).scalars()
|
||||
)
|
||||
has_actors = True
|
||||
# If this message from outbox starts a thread with no replies, look
|
||||
# at the mentions
|
||||
if not actors and anybox_object.is_from_outbox:
|
||||
has_actors = False
|
||||
actors = ( # type: ignore
|
||||
await db_session.execute(
|
||||
select(models.Actor).where(
|
||||
|
@ -601,7 +603,7 @@ async def admin_direct_messages(
|
|||
)
|
||||
)
|
||||
).scalars()
|
||||
threads.append((anybox_object, convo, actors))
|
||||
threads.append((anybox_object, convo, actors, has_actors))
|
||||
|
||||
return await templates.render_template(
|
||||
db_session,
|
||||
|
|
|
@ -7,13 +7,15 @@
|
|||
|
||||
{% block content %}
|
||||
|
||||
{% for anybox_object, convo, actors in threads %}
|
||||
{% for anybox_object, convo, actors, has_actors in threads %}
|
||||
<div class="actor-action">
|
||||
{% if has_actors %}
|
||||
With {% for actor in actors %}
|
||||
<a href="{{ url_for("admin_profile") }}?actor_id={{ actor.ap_id }}">
|
||||
{{ actor.handle }}
|
||||
</a>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
{{ utils.display_object(anybox_object) }}
|
||||
{% endfor %}
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -xe
|
||||
|
||||
sudo docker compose build
|
||||
sudo docker compose down
|
||||
sudo docker compose up -d
|
Loading…
Reference in New Issue