Chat: Fix wrong query.

This commit is contained in:
lain 2020-05-11 10:58:14 +02:00
commit fdb98715b8
2 changed files with 18 additions and 0 deletions

View file

@ -29,6 +29,7 @@ defmodule Pleroma.Chat do
def last_message_for_chat(chat) do
messages_for_chat_query(chat)
|> order_by(desc: :id)
|> limit(1)
|> Repo.one()
end