aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/web/chat_channel.ex
diff options
context:
space:
mode:
Diffstat (limited to 'lib/pleroma/web/chat_channel.ex')
-rw-r--r--lib/pleroma/web/chat_channel.ex4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/pleroma/web/chat_channel.ex b/lib/pleroma/web/chat_channel.ex
index f63f4bda1..b543909f1 100644
--- a/lib/pleroma/web/chat_channel.ex
+++ b/lib/pleroma/web/chat_channel.ex
@@ -33,9 +33,11 @@ defmodule Pleroma.Web.ChatChannel do
end
defmodule Pleroma.Web.ChatChannel.ChatChannelState do
+ use Agent
+
@max_messages 20
- def start_link do
+ def start_link(_) do
Agent.start_link(fn -> %{max_id: 1, messages: []} end, name: __MODULE__)
end