mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-10 03:17:51 +00:00
Merge branch '459_fix_user_profile_crash' into 'develop'
Fix update_profile failing due to OAuth token record in assigns instead of string Closes #459 See merge request pleroma/pleroma!561
This commit is contained in:
commit
3d980daa49
1 changed files with 4 additions and 1 deletions
|
@ -86,7 +86,7 @@ defmodule Pleroma.Web.TwitterAPI.UserView do
|
||||||
}
|
}
|
||||||
|
|
||||||
if assigns[:token] do
|
if assigns[:token] do
|
||||||
Map.put(data, "token", assigns[:token])
|
Map.put(data, "token", token_string(assigns[:token]))
|
||||||
else
|
else
|
||||||
data
|
data
|
||||||
end
|
end
|
||||||
|
@ -111,4 +111,7 @@ defmodule Pleroma.Web.TwitterAPI.UserView do
|
||||||
|
|
||||||
defp image_url(%{"url" => [%{"href" => href} | _]}), do: href
|
defp image_url(%{"url" => [%{"href" => href} | _]}), do: href
|
||||||
defp image_url(_), do: nil
|
defp image_url(_), do: nil
|
||||||
|
|
||||||
|
defp token_string(%Pleroma.Web.OAuth.Token{token: token_str}), do: token_str
|
||||||
|
defp token_string(token), do: token
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue