use default child_specs
This commit is contained in:
parent
4a5b0965a0
commit
51bdf0cab6
13 changed files with 73 additions and 143 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue