Skip to content

Commit

Permalink
Merge branch 'fix/disclose_client' into 'develop'
Browse files Browse the repository at this point in the history
Fix User.disclose_client never working correctly

See merge request pleroma/pleroma!4199
  • Loading branch information
feld committed Jul 31, 2024
2 parents f646b05 + e6951e7 commit f2dc706
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.d/disclose_client.fix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Client application data was always missing from the status
2 changes: 1 addition & 1 deletion lib/pleroma/web/plugs/o_auth_plug.ex
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ defmodule Pleroma.Web.Plugs.OAuthPlug do
where: t.token == ^token
)

with %Token{user_id: user_id} = token_record <- Repo.one(token_query),
with %Token{user_id: user_id} = token_record <- Repo.one(token_query) |> Repo.preload(:user),
false <- is_nil(user_id),
%User{} = user <- User.get_cached_by_id(user_id) do
{:ok, user, token_record}
Expand Down

0 comments on commit f2dc706

Please sign in to comment.