Merge develop into feature/770-add-emoji-tags
[akkoma] / lib / pleroma / web / oauth / token.ex
index a8b06db36d90fb83ddb1b5f0e554218d9c01b24d..2b5ad9b9448bdfae6579878e6bfa53e2f518c067 100644 (file)
@@ -27,7 +27,7 @@ defmodule Pleroma.Web.OAuth.Token do
   def exchange_token(app, auth) do
     with {:ok, auth} <- Authorization.use_token(auth),
          true <- auth.app_id == app.id do
-      create_token(app, Repo.get(User, auth.user_id), auth.scopes)
+      create_token(app, User.get_by_id(auth.user_id), auth.scopes)
     end
   end