fix: Do not include (nearly) empty chats

This commit is contained in:
Daniel Kempkens 2023-08-15 13:09:13 +02:00
parent f9102c4c27
commit f5c0ed776e
Signed by: daniel
SSH key fingerprint: SHA256:Ks/MyhQYcPRQiwMKLAKquWCdCPe3JXlb1WttgnAoSeM

View file

@ -2,7 +2,7 @@
<div class="row text-center">
<div class="d-grid gap-2 col-12 mx-auto">
<%= for chat when chat.num_messages > 5 <- chats do %>
<%= for chat when chat.num_messages > 10 and length(chat.accounts) > 1 <- chats do %>
<div class="card">
<div class="card-body">
<h5 class="card-title"><a href="/chats/<%= URI.encode(chat.id, &URI.char_unreserved?/1) %>"><%= Enum.join(chat.accounts, ", ") %></a></h5>