Notification: Add function to backfill notification types
[akkoma] / lib / pleroma / chat.ex
index 6a03ee3c1d2e687a93ab76cf1b6e72749c43c45f..4c92a58c737fffd678416fa1beae2c498ce49597 100644 (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