logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://anongit.hacktivis.me/git/pleroma.git/
commit: a06d09ab15249d2d8b696c7873c7cf43f3356e54
parent 1efe48672d9daf57093f4ae7facba5790c3c1920
Author: nicole mikołajczyk <git@mkljczk.pl>
Date:   Sat, 27 Sep 2025 10:50:51 +0200

Update voters count in remote polls when refreshing

Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>

Diffstat:

Achangelog.d/update-poll-voters-count.fix1+
Mlib/pleroma/object/updater.ex2++
2 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/changelog.d/update-poll-voters-count.fix b/changelog.d/update-poll-voters-count.fix @@ -0,0 +1 @@ +Update voters count in remote polls when refreshing diff --git a/lib/pleroma/object/updater.ex b/lib/pleroma/object/updater.ex @@ -5,6 +5,7 @@ defmodule Pleroma.Object.Updater do require Pleroma.Constants + alias Pleroma.Maps alias Pleroma.Object alias Pleroma.Repo @@ -115,6 +116,7 @@ defmodule Pleroma.Object.Updater do # Choices are the same, but counts are different to_be_updated |> Map.put(key, updated_object[key]) + |> Maps.put_if_present("votersCount", updated_object["votersCount"]) else # Choices (or vote type) have changed, do not allow this _ -> to_be_updated