Apply suggestion to lib/pleroma/web/mastodon_api/websocket_handler.ex

This commit is contained in:
kaniini 2019-10-18 04:36:37 +00:00
parent 5bd0717de2
commit 733b73b71c

View File

@ -36,7 +36,7 @@ defmodule Pleroma.Web.MastodonAPI.WebsocketHandler do
{:ok, user} <- allow_request(stream, [access_token, sec_websocket]),
topic when is_binary(topic) <- expand_topic(stream, params) do
req =
if sec_websocket != nil do
if sec_websocket do
:cowboy_req.set_resp_header("sec-websocket-protocol", sec_websocket, req)
else
req