projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4444061
)
Mastodon API: Refresh the object before rendering it after voting
author
rinpatch
<rinpatch@sdf.org>
Sat, 1 Jun 2019 18:41:49 +0000
(21:41 +0300)
committer
rinpatch
<rinpatch@sdf.org>
Sat, 1 Jun 2019 18:41:49 +0000
(21:41 +0300)
lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
patch
|
blob
|
history
diff --git
a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
index bab6d693d87fe601cf29deab997be6fd722f42ad..8da31161f4e6ae72964bb933bd7d214de1f35a29 100644
(file)
--- a/
lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
+++ b/
lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
@@
-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})