<%- include("extra/meta", {title: thread.title }) %> <%- include("extra/navbar") %> <% if (user){ %> <% }; %>
<%= thread.title %>
<%= new Date(thread.time).toLocaleString() %> • Views: <%= thread.views %> <%= "• "+(thread.edited ? "Edited" : "Not edited")%>
<% if (user && !thread.deleted){ %> DELETE EDIT <% } else if (thread.deleted) { %>

This thread has been deleted

UNDELETE <% }; %>
<% messages.filter(Boolean).forEach(message=>{ %>
<%= new Date(message.time).toLocaleDateString() %>
<%= new Date(message.time).toLocaleTimeString() %>
<%- message.content %>
<% if(user){ %> <% if(user.id === message.authorID || user.admin){ %>
<% if (message.deleted){ %> <% } %> <% if (message.edited){ %> <% } %>
<% if (!message.deleted){ %> Delete Edit <% }else { %> Undelete <% } %>
<% } %>
<%=message.react.like.length %>
<%=message.react.dislike.length %>
<% }; %>
<% }); %>
<% if (user){ %>
<% }%>