add bubble timeline #100

Merged
floatingghost merged 4 commits from bubble-keikaku into develop 2022-07-22 14:55:38 +00:00
1 changed files with 4 additions and 0 deletions
Showing only changes of commit e9b7d2409f - Show all commits

View File

@ -64,6 +64,10 @@ defmodule Pleroma.Web.MastodonAPI.WebsocketHandler do
# We only receive pings for now
def websocket_handle(:ping, state), do: {:ok, state}
def websocket_handle({:text, "ping"}, state) do
if state.timer, do: Process.cancel_timer(state.timer)
{:reply, {:text, "pong"}, %{state | timer: timer()}}
end
def websocket_handle(frame, state) do
Logger.error("#{__MODULE__} received frame: #{inspect(frame)}")