Merge branch 'systemd-drop-sysadmin-privilege' into 'develop'
[akkoma] / lib / pleroma / web / mastodon_api / views / filter_view.ex
index e8401cc2d7e1e030fa11f4c28a02b9768d059d5e..ffbd830e1dbffcfaf15e7bff38c00a0c7a9f496c 100644 (file)
@@ -1,3 +1,7 @@
+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2018 Pleroma Authors <https://pleroma.social/>
+# SPDX-License-Identifier: AGPL-3.0-only
+
 defmodule Pleroma.Web.MastodonAPI.FilterView do
   use Pleroma.Web, :view
   alias Pleroma.Web.MastodonAPI.FilterView
@@ -8,11 +12,12 @@ defmodule Pleroma.Web.MastodonAPI.FilterView do
   end
 
   def render("filter.json", %{filter: filter}) do
-    if filter.expires_at do
-      expires_at = Utils.to_masto_date(filter.expires_at)
-    else
-      expires_at = nil
-    end
+    expires_at =
+      if filter.expires_at do
+        Utils.to_masto_date(filter.expires_at)
+      else
+        nil
+      end
 
     %{
       id: to_string(filter.filter_id),