Small cleanup.
authorlain <lain@soykaf.club>
Sun, 22 Apr 2018 08:01:10 +0000 (10:01 +0200)
committerlain <lain@soykaf.club>
Sun, 22 Apr 2018 08:01:10 +0000 (10:01 +0200)
lib/pleroma/formatter.ex
lib/pleroma/web/common_api/common_api.ex
test/web/activity_pub/transmogrifier_test.exs

index a708a275e881fd431de67470b7a091f9e6dcc4b5..456416fbdff4eecc6127ee9ea36bbd486cc6ecd7 100644 (file)
@@ -169,8 +169,11 @@ defmodule Pleroma.Formatter do
       subs ++
         Enum.map(links, fn {uuid, url} ->
           {:safe, link} = Phoenix.HTML.Link.link(url, to: url)
-          link = link
-          |> IO.iodata_to_binary
+
+          link =
+            link
+            |> IO.iodata_to_binary()
+
           {uuid, link}
         end)
 
index 21225c3b7d8a95b908b2820a795433dec25fdf0a..2c4b591d4a9477d14584821b32f424d894122808 100644 (file)
@@ -103,7 +103,6 @@ defmodule Pleroma.Web.CommonAPI do
           additional: %{"cc" => cc}
         })
 
-      User.increase_note_count(user)
       res
     end
   end
index 3dab597465d2b212ff9b6dabd230a1daaa3b1188..eb093262f82cbff2e710b2f230d4aecd631e594f 100644 (file)
@@ -89,6 +89,10 @@ defmodule Pleroma.Web.ActivityPub.TransmogrifierTest do
                "tag:mastodon.example.org,2018-02-12:objectId=20:objectType=Conversation"
 
       assert object["sensitive"] == true
+
+      user = User.get_by_ap_id(object["actor"])
+
+      assert user.info["note_count"] == 1
     end
 
     test "it works for incoming notices with hashtags" do