Apply suggestion to lib/pleroma/web/mastodon_api/websocket_handler.ex
authorkaniini <ariadne@dereferenced.org>
Fri, 18 Oct 2019 04:36:37 +0000 (04:36 +0000)
committerkaniini <ariadne@dereferenced.org>
Fri, 18 Oct 2019 04:36:37 +0000 (04:36 +0000)
lib/pleroma/web/mastodon_api/websocket_handler.ex

index 1a757363fc92bb17e8657feaa71665e6161a6468..a400d1c8d7e54186038aeb2528a32bbbec6ec609 100644 (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