Refactor lib/pleroma/web/twitter_api/twitter_api.ex
authordtluna <dtluna@openmailbox.org>
Sat, 8 Apr 2017 14:19:57 +0000 (17:19 +0300)
committerdtluna <dtluna@openmailbox.org>
Sat, 8 Apr 2017 14:19:57 +0000 (17:19 +0300)
lib/pleroma/web/twitter_api/twitter_api.ex

index 932bef5efa7a5127d14cc96bdbadb7550b7346a8..0d9a491dafaf98b052318854878242c26613dd34 100644 (file)
@@ -25,6 +25,8 @@ defmodule Pleroma.Web.TwitterAPI.TwitterAPI do
 
     content_html = add_user_links(content, mentions)
 
+    date = make_date
+
     activity = %{
       "type" => "Create",
       "to" => to,
@@ -33,11 +35,11 @@ defmodule Pleroma.Web.TwitterAPI.TwitterAPI do
         "type" => "Note",
         "to" => to,
         "content" => content_html,
-        "published" => make_date,
+        "published" => date,
         "context" => context,
         "attachment" => attachments
       },
-      "published" => make_date,
+      "published" => date,
       "context" => context
     }