mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2025-02-13 09:35:17 +00:00
Improve side effects logic for bumping replies count
The previous fix was good, but let's avoid playing code golf.
This commit is contained in:
parent
62856ab18f
commit
625a5af933
1 changed files with 4 additions and 2 deletions
|
@ -209,8 +209,10 @@ defmodule Pleroma.Web.ActivityPub.SideEffects do
|
||||||
{:ok, _user} = ActivityPub.increase_note_count_if_public(user, object)
|
{:ok, _user} = ActivityPub.increase_note_count_if_public(user, object)
|
||||||
{:ok, _user} = ActivityPub.update_last_status_at_if_public(user, object)
|
{:ok, _user} = ActivityPub.update_last_status_at_if_public(user, object)
|
||||||
|
|
||||||
if in_reply_to = object.data["type"] != "Answer" && object.data["inReplyTo"] do
|
reply_to_ap_id = object.data["inReplyTo"]
|
||||||
Object.increase_replies_count(in_reply_to)
|
|
||||||
|
if object.data["type"] not in ["Answer"] and is_binary(reply_to_ap_id) do
|
||||||
|
Object.increase_replies_count(reply_to_ap_id)
|
||||||
end
|
end
|
||||||
|
|
||||||
if quote_url = object.data["quoteUrl"] do
|
if quote_url = object.data["quoteUrl"] do
|
||||||
|
|
Loading…
Reference in a new issue