aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/chat.ex1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/pleroma/chat.ex b/lib/pleroma/chat.ex
index 6a03ee3c1..4c92a58c7 100644
--- a/lib/pleroma/chat.ex
+++ b/lib/pleroma/chat.ex
@@ -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