diff options
author | ThibG <thib@sitedethib.com> | 2019-10-02 18:30:33 +0200 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2020-02-20 23:53:07 -0600 |
commit | a2bdf1226f6fe7d607f7c8bc7d1de204f3c76228 (patch) | |
tree | 94405b812cfb1f11f09dbfcb78955f05ff1468f5 | |
parent | 2f1ed5a34422a9537a00ac737ece30ae101cc239 (diff) |
port tootsuite#12054 to monsterfork: Fix RSS caching (but disable localization)
-rw-r--r-- | app/controllers/accounts_controller.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/controllers/accounts_controller.rb b/app/controllers/accounts_controller.rb index 541a82b2e..7197c16b1 100644 --- a/app/controllers/accounts_controller.rb +++ b/app/controllers/accounts_controller.rb @@ -9,7 +9,7 @@ class AccountsController < ApplicationController before_action :set_cache_headers before_action :set_body_classes - skip_around_action :set_locale, if: -> { request.format == :json } + skip_around_action :set_locale, if: -> { [:json, :rss].include?(request.format) } skip_before_action :require_functional! def show @@ -47,6 +47,7 @@ class AccountsController < ApplicationController format.rss do expires_in 1.minute, public: true +<<<<<<< HEAD if current_account&.user&.allows_rss? @statuses = filtered_statuses.without_reblogs.without_replies.limit(PAGE_SIZE) @@ -54,6 +55,8 @@ class AccountsController < ApplicationController else @statuses = [] end +======= +>>>>>>> 699f53c46... Fix RSS caching (but disable localization) (#12054) render xml: RSS::AccountSerializer.render(@account, @statuses, params[:tag]) end |