diff options
author | multiple creatures <dev@multiple-creature.party> | 2020-02-04 20:48:02 -0600 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2020-02-04 20:48:02 -0600 |
commit | 739b715c29fadb2f7d1b63961d6bd7577537d740 (patch) | |
tree | 07467d02d7c691abe3b557d56f9ad5d9d4be947a /app | |
parent | 8eaba1b6f933bf72d5434d5a6f0ddbd3e62228f6 (diff) |
outright throw 404 if rss is disabled
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/accounts_controller.rb | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/app/controllers/accounts_controller.rb b/app/controllers/accounts_controller.rb index f29be82c9..7af95b51c 100644 --- a/app/controllers/accounts_controller.rb +++ b/app/controllers/accounts_controller.rb @@ -43,12 +43,10 @@ class AccountsController < ApplicationController format.rss do expires_in 1.minute, public: true - if current_account&.user&.allows_rss? - @statuses = filtered_statuses.without_reblogs.without_replies.limit(PAGE_SIZE) - @statuses = cache_collection(@statuses, Status) - else - @statuses = [] - end + not_found unless current_account&.user&.allows_rss? + + @statuses = filtered_statuses.without_reblogs.without_replies.limit(PAGE_SIZE) + @statuses = cache_collection(@statuses, Status) render xml: RSS::AccountSerializer.render(@account, @statuses, params[:tag]) end |