% route = fn p -> ~p"/conversations/#{@conversation}?#{p}" end
pagination = render(PhilomenaWeb.PaginationView, "_pagination.html", page: @messages, route: route, conn: @conn)
other = other_party(@current_user, @conversation) %>
<%= @conversation.title %>
<%= for {message, body} <- @messages do %>
<%= render(PhilomenaWeb.MessageView, "_message.html", message: message, body: body, conn: @conn) %>
<% end %>
<%= case DateTime.compare(DateTime.utc_now(), DateTime.add(@conn.assigns.current_user.created_at, 1_209_600)) do %>
<% :lt -> %>
Warning!
Your account is too new, so your PM will need to be reviewed by staff members.
This is because it contains an external image. If you are not okay with a moderator viewing this PM conversation, please consider linking the image instead of embedding it (change
![
to
[
).
<% _ -> %>
<% # Nothing %>
<% end %>
<%= cond do %>
<% @conn.assigns.current_ban -> %>
<%= render(PhilomenaWeb.BanView, "_ban_reason.html", conn: @conn) %>
<% @messages.total_entries < 1_000 -> %>
<%= render(PhilomenaWeb.Conversation.MessageView, "_form.html", conversation: @conversation, changeset: @changeset, conn: @conn) %>
<% true -> %>
Okay, we're impressed
You've managed to send over 1,000 messages in this conversation!
We'd like to ask you to make a new conversation. Don't worry, this one won't go anywhere if you need to refer back to it.
<%= link("Click here", to: ~p"/conversations/new?#{[receipient: other.name]}") %> to make a new conversation with this user.
<% end %>