logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma
commit: 0574df273c06f8ce5dea10f9978c7dd5bfea558d
parent: 114ca9e069a0914cc1ad8bf13690818eb132b0bf
Author: lain <lain@soykaf.club>
Date:   Sun, 22 Apr 2018 10:01:10 +0200

Small cleanup.

Diffstat:

Mlib/pleroma/formatter.ex7+++++--
Mlib/pleroma/web/common_api/common_api.ex1-
Mtest/web/activity_pub/transmogrifier_test.exs4++++
3 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/lib/pleroma/formatter.ex b/lib/pleroma/formatter.ex @@ -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) diff --git a/lib/pleroma/web/common_api/common_api.ex b/lib/pleroma/web/common_api/common_api.ex @@ -103,7 +103,6 @@ defmodule Pleroma.Web.CommonAPI do additional: %{"cc" => cc} }) - User.increase_note_count(user) res end end diff --git a/test/web/activity_pub/transmogrifier_test.exs b/test/web/activity_pub/transmogrifier_test.exs @@ -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