projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Save follower count and note count in user.
[akkoma]
/
lib
/
pleroma
/
web
/
ostatus
/
handlers
/
note_handler.ex
diff --git
a/lib/pleroma/web/ostatus/handlers/note_handler.ex
b/lib/pleroma/web/ostatus/handlers/note_handler.ex
index e0e4afef690f6283d5a69c996692e441cdd16e35..e55f972b21bc89d25046acf76658b9a346d9bfe9 100644
(file)
--- a/
lib/pleroma/web/ostatus/handlers/note_handler.ex
+++ b/
lib/pleroma/web/ostatus/handlers/note_handler.ex
@@
-61,7
+61,7
@@
defmodule Pleroma.Web.OStatus.NoteHandler do
def make_to_list(actor, mentions) do
[
def make_to_list(actor, mentions) do
[
- User.ap_followers(actor)
+ actor.follower_address
] ++ mentions
end
] ++ mentions
end
@@
-92,7
+92,9
@@
defmodule Pleroma.Web.OStatus.NoteHandler do
# TODO: Handle this case in make_note_data
note <- (if inReplyTo && !inReplyToActivity, do: note |> Map.put("inReplyTo", inReplyTo), else: note)
do
# TODO: Handle this case in make_note_data
note <- (if inReplyTo && !inReplyToActivity, do: note |> Map.put("inReplyTo", inReplyTo), else: note)
do
- ActivityPub.create(to, actor, context, note, %{}, date, false)
+ res = ActivityPub.create(to, actor, context, note, %{}, date, false)
+ User.update_note_count(actor)
+ res
else
%Activity{} = activity -> {:ok, activity}
e -> {:error, e}
else
%Activity{} = activity -> {:ok, activity}
e -> {:error, e}