Direct message report action

This commit is contained in:
Mouse Reeve 2021-03-12 10:37:52 -08:00
parent 8bd12f0e06
commit 422cd2da73
3 changed files with 6 additions and 3 deletions

View file

@ -16,7 +16,7 @@
<div class="block content">
<h3>{% trans "Actions" %}</h3>
<div class="field is-grouped">
<button class="button">Direct message</button>
<a class="button" href="{% url 'direct-messages-user' report.user.username %}">{% trans "Send direct message" %}</a>
<button class="button">Suspend</button>
</div>

View file

@ -22,7 +22,7 @@
{% else %}
{# things you can do to other people's statuses #}
<li role="menuitem">
<a href="/direct-messages/{{ status.user|username }}" class="button is-small is-fullwidth">{% trans "Send direct message" %}</a>
<a href="{% url 'direct-messages-user' status.user|username %}" class="button is-small is-fullwidth">{% trans "Send direct message" %}</a>
</li>
<li role="menuitem">
{% include 'snippets/report_button.html' with user=status.user status=status %}

View file

@ -75,10 +75,13 @@ urlpatterns = [
re_path(r"^notifications/?$", views.Notifications.as_view()),
# feeds
re_path(r"^(?P<tab>home|local|federated)/?$", views.Feed.as_view()),
re_path(r"^direct-messages/?$", views.DirectMessage.as_view()),
re_path(
r"^direct-messages/?$", views.DirectMessage.as_view(), name="direct-messages"
),
re_path(
r"^direct-messages/(?P<username>%s)?$" % regex.username,
views.DirectMessage.as_view(),
name="direct-messages-user",
),
# search
re_path(r"^search/?$", views.Search.as_view()),