Skip to content

Commit

Permalink
feat: Redirect /authorize_interaction to /ostatus_subscribe
Browse files Browse the repository at this point in the history
  • Loading branch information
null2264 committed Oct 16, 2023
1 parent fe2b5bc commit e0e6b2a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## 1.0.0 (Spirit) [Unreleased]
## 3.10.5 (Spirit) [Unreleased]

## Added
- Full compatibility with Erlang OTP26
- Handling of GET /api/v1/preferences
- Support for indefinite polls
- Added new translator
- Added new translatr
- Redirect /authorize_interaction to /ostatus_subscribe

## Changed
- OTP builds are now built on erlang OTP26
Expand Down
4 changes: 4 additions & 0 deletions lib/pleroma/web/fallback/redirect_controller.ex
Original file line number Diff line number Diff line change
Expand Up @@ -128,4 +128,8 @@ defmodule Pleroma.Web.Fallback.RedirectController do
defp build_meta(:favicon, _) do
"<link rel=\"icon\" href=\"#{Pleroma.Config.get([:instance, :favicon])}\">"
end

def redirect_interaction(conn, %{"uri" => uri}) do
redirect(conn, to: "/ostatus_subscribe?acct=#{uri}")
end
end
1 change: 1 addition & 0 deletions lib/pleroma/web/router.ex
Original file line number Diff line number Diff line change
Expand Up @@ -936,6 +936,7 @@ defmodule Pleroma.Web.Router do
end

scope "/", Pleroma.Web.Fallback do
get("/authorize_interaction", RedirectController, :redirect_interaction)
get("/registration/:token", RedirectController, :registration_page)
get("/:maybe_nickname_or_id", RedirectController, :redirector_with_meta)
get("/api/*path", RedirectController, :api_not_implemented)
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ defmodule Pleroma.Mixfile do
def project do
[
app: :pleroma,
version: version("3.10.4"),
version: version("3.10.5"),
elixir: "~> 1.14",
elixirc_paths: elixirc_paths(Mix.env()),
compilers: Mix.compilers(),
Expand Down

0 comments on commit e0e6b2a

Please sign in to comment.