diff options
author | multiple creatures <dev@multiple-creature.party> | 2020-02-18 02:02:54 -0600 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2020-02-18 02:18:09 -0600 |
commit | 0f3b01eaab82325baaf1c7a4c75a322d3c21a67f (patch) | |
tree | f3d19c99328336997919803ffc6850a96d5a6411 /app/controllers/accounts_controller.rb | |
parent | fc69e4a0bb4e3d2fdcb2ffef0f3211f8c347ed15 (diff) |
switch to irc-like oper behavior; require mods & admins to explicitly oper up using `fangs`/`op` bangtag or toggling defang setting in profile; auto-defang after 15 mins or with `defang`/`deop` bangtag
Diffstat (limited to 'app/controllers/accounts_controller.rb')
-rw-r--r-- | app/controllers/accounts_controller.rb | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/app/controllers/accounts_controller.rb b/app/controllers/accounts_controller.rb index 3359eafdf..8bff3ab18 100644 --- a/app/controllers/accounts_controller.rb +++ b/app/controllers/accounts_controller.rb @@ -16,7 +16,8 @@ class AccountsController < ApplicationController unless current_account&.id == @account.id if @account.hidden || @account&.user&.hides_public_profile? - return not_found unless current_account&.following?(@account) + not_found unless current_account&.following?(@account) + return end end @@ -44,10 +45,12 @@ class AccountsController < ApplicationController format.rss do expires_in 1.minute, public: true - return not_found unless current_account&.user&.allows_rss? - - @statuses = filtered_statuses.without_reblogs.without_replies.limit(PAGE_SIZE) - @statuses = cache_collection(@statuses, Status) + if current_account&.user&.allows_rss? + @statuses = filtered_statuses.without_reblogs.without_replies.limit(PAGE_SIZE) + @statuses = cache_collection(@statuses, Status) + else + @statuses = [] + end render xml: RSS::AccountSerializer.render(@account, @statuses, params[:tag]) end |