mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-11-20 08:30:59 +00:00
Mastodon API: Refresh the object before rendering it after voting
This commit is contained in:
parent
444406167b
commit
6bc9e5c020
1 changed files with 2 additions and 0 deletions
|
@ -436,6 +436,8 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
|
|||
%Activity{} = activity <- Activity.get_create_by_object_ap_id(object.data["id"]),
|
||||
true <- Visibility.visible_for_user?(activity, user),
|
||||
{:ok, _activities, object} <- CommonAPI.vote(user, object, choices) do
|
||||
object = Object.get_cached_by_ap_id(object.data["id"])
|
||||
|
||||
conn
|
||||
|> put_view(StatusView)
|
||||
|> try_render("poll.json", %{object: object, for: user})
|
||||
|
|
Loading…
Reference in a new issue