Merge commit 'ad245adf510cf56953ebb8a7dfc5db16c0f58403' into glitch-soc/merge-upstream
Conflicts: - `spec/controllers/application_controller_spec.rb`: Upstream changed some test cases, where glitch-soc had extra tests. Changed as upstream did while preserving glitch-soc's tests.
This commit is contained in:
commit
2ee260423f
70 files changed
+890
-218
No files matched your search
@@ -104,8 +104,8 @@ jobs:
|
||||
bin/rails db:create
|
||||
SKIP_POST_DEPLOYMENT_MIGRATIONS=true bin/rails tests:migrations:prepare_database
|
||||
|
||||
# Migrate up to v4.2.0 breakpoint
|
||||
bin/rails db:migrate VERSION=20230907150100
|
||||
# Migrate up to v4.3.0 breakpoint
|
||||
bin/rails db:migrate VERSION=20241007071624
|
||||
|
||||
# Migrate the rest
|
||||
SKIP_POST_DEPLOYMENT_MIGRATIONS=true bin/rails db:migrate
|
||||
|
||||
@@ -13,4 +13,8 @@ class ActivityPub::BaseController < Api::BaseController
|
||||
def skip_temporary_suspension_response?
|
||||
false
|
||||
end
|
||||
|
||||
def skip_pending_deletion_response?
|
||||
false
|
||||
end
|
||||
end
|
||||
@@ -40,6 +40,10 @@ class ActivityPub::InboxesController < ActivityPub::BaseController
|
||||
true
|
||||
end
|
||||
|
||||
def skip_pending_deletion_response?
|
||||
true
|
||||
end
|
||||
|
||||
def body
|
||||
return @body if defined?(@body)
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class Api::V1::Accounts::BaseController < Api::BaseController
|
||||
private
|
||||
|
||||
def set_account
|
||||
@account = Account.without_requested_deletion.find(params[:account_id])
|
||||
end
|
||||
end
|
||||
@@ -1,6 +1,6 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class Api::V1::Accounts::EndorsementsController < Api::BaseController
|
||||
class Api::V1::Accounts::EndorsementsController < Api::V1::Accounts::BaseController
|
||||
include Authorization
|
||||
|
||||
before_action -> { authorize_if_got_token! :read, :'read:accounts' }, only: :index
|
||||
@@ -28,10 +28,6 @@ class Api::V1::Accounts::EndorsementsController < Api::BaseController
|
||||
|
||||
private
|
||||
|
||||
def set_account
|
||||
@account = Account.find(params[:account_id])
|
||||
end
|
||||
|
||||
def set_endorsed_accounts
|
||||
@endorsed_accounts = @account.unavailable? ? [] : paginated_endorsed_accounts
|
||||
end
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class Api::V1::Accounts::FeaturedTagsController < Api::BaseController
|
||||
class Api::V1::Accounts::FeaturedTagsController < Api::V1::Accounts::BaseController
|
||||
before_action :set_account
|
||||
before_action :set_featured_tags
|
||||
|
||||
@@ -12,10 +12,6 @@ class Api::V1::Accounts::FeaturedTagsController < Api::BaseController
|
||||
|
||||
private
|
||||
|
||||
def set_account
|
||||
@account = Account.find(params[:account_id])
|
||||
end
|
||||
|
||||
def set_featured_tags
|
||||
@featured_tags = @account.unavailable? ? [] : @account.featured_tags
|
||||
end
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class Api::V1::Accounts::FollowerAccountsController < Api::BaseController
|
||||
class Api::V1::Accounts::FollowerAccountsController < Api::V1::Accounts::BaseController
|
||||
before_action -> { authorize_if_got_token! :read, :'read:accounts' }
|
||||
before_action :set_account
|
||||
after_action :insert_pagination_headers
|
||||
@@ -13,10 +13,6 @@ class Api::V1::Accounts::FollowerAccountsController < Api::BaseController
|
||||
|
||||
private
|
||||
|
||||
def set_account
|
||||
@account = Account.find(params[:account_id])
|
||||
end
|
||||
|
||||
def load_accounts
|
||||
return [] if hide_results?
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class Api::V1::Accounts::FollowingAccountsController < Api::BaseController
|
||||
class Api::V1::Accounts::FollowingAccountsController < Api::V1::Accounts::BaseController
|
||||
before_action -> { authorize_if_got_token! :read, :'read:accounts' }
|
||||
before_action :set_account
|
||||
after_action :insert_pagination_headers
|
||||
@@ -13,10 +13,6 @@ class Api::V1::Accounts::FollowingAccountsController < Api::BaseController
|
||||
|
||||
private
|
||||
|
||||
def set_account
|
||||
@account = Account.find(params[:account_id])
|
||||
end
|
||||
|
||||
def load_accounts
|
||||
return [] if hide_results?
|
||||
|
||||
|
||||
@@ -6,15 +6,8 @@ class Api::V1::Accounts::IdentityProofsController < Api::BaseController
|
||||
deprecate_api '2022-03-30'
|
||||
|
||||
before_action :require_user!
|
||||
before_action :set_account
|
||||
|
||||
def index
|
||||
render json: []
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def set_account
|
||||
@account = Account.find(params[:account_id])
|
||||
end
|
||||
end
|
||||
@@ -1,6 +1,6 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class Api::V1::Accounts::ListsController < Api::BaseController
|
||||
class Api::V1::Accounts::ListsController < Api::V1::Accounts::BaseController
|
||||
before_action -> { doorkeeper_authorize! :read, :'read:lists' }
|
||||
before_action :require_user!
|
||||
before_action :set_account
|
||||
@@ -9,10 +9,4 @@ class Api::V1::Accounts::ListsController < Api::BaseController
|
||||
@lists = @account.suspended? ? [] : @account.lists.where(account: current_account)
|
||||
render json: @lists, each_serializer: REST::ListSerializer
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def set_account
|
||||
@account = Account.find(params[:account_id])
|
||||
end
|
||||
end
|
||||
@@ -13,6 +13,7 @@ class Api::V1::Accounts::LookupController < Api::BaseController
|
||||
|
||||
def set_account
|
||||
@account = ResolveAccountService.new.call(params[:acct], skip_webfinger: true) || raise(ActiveRecord::RecordNotFound)
|
||||
raise ActiveRecord::RecordNotFound if @account.deleted?
|
||||
rescue Addressable::URI::InvalidURIError
|
||||
raise(ActiveRecord::RecordNotFound)
|
||||
end
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class Api::V1::Accounts::NotesController < Api::BaseController
|
||||
class Api::V1::Accounts::NotesController < Api::V1::Accounts::BaseController
|
||||
include Authorization
|
||||
|
||||
before_action -> { doorkeeper_authorize! :write, :'write:accounts' }
|
||||
@@ -20,10 +20,6 @@ class Api::V1::Accounts::NotesController < Api::BaseController
|
||||
|
||||
private
|
||||
|
||||
def set_account
|
||||
@account = Account.find(params[:account_id])
|
||||
end
|
||||
|
||||
def relationships_presenter
|
||||
AccountRelationshipsPresenter.new([@account], current_user.account_id)
|
||||
end
|
||||
|
||||
@@ -5,7 +5,7 @@ class Api::V1::Accounts::RelationshipsController < Api::BaseController
|
||||
before_action :require_user!
|
||||
|
||||
def index
|
||||
@accounts = Account.where(id: account_ids).select(:id, :domain)
|
||||
@accounts = Account.without_requested_deletion.where(id: account_ids).select(:id, :domain)
|
||||
@accounts.merge!(Account.without_suspended) unless truthy_param?(:with_suspended)
|
||||
render json: @accounts, each_serializer: REST::RelationshipSerializer, relationships: relationships
|
||||
end
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class Api::V1::Accounts::StatusesController < Api::BaseController
|
||||
class Api::V1::Accounts::StatusesController < Api::V1::Accounts::BaseController
|
||||
before_action -> { authorize_if_got_token! :read, :'read:statuses' }
|
||||
before_action :set_account
|
||||
|
||||
@@ -14,10 +14,6 @@ class Api::V1::Accounts::StatusesController < Api::BaseController
|
||||
|
||||
private
|
||||
|
||||
def set_account
|
||||
@account = Account.find(params[:account_id])
|
||||
end
|
||||
|
||||
def load_statuses
|
||||
@account.unavailable? ? [] : preloaded_account_statuses
|
||||
end
|
||||
|
||||
@@ -84,7 +84,7 @@ class Api::V1::AccountsController < Api::BaseController
|
||||
private
|
||||
|
||||
def set_account
|
||||
@account = Account.find(params[:id])
|
||||
@account = Account.without_requested_deletion.find(params[:id])
|
||||
end
|
||||
|
||||
def set_accounts
|
||||
|
||||
@@ -50,7 +50,7 @@ class Api::V1::CollectionItemsController < Api::BaseController
|
||||
def set_account
|
||||
return render(json: { error: '`account_id` parameter is missing' }, status: 422) if params[:account_id].blank?
|
||||
|
||||
@account = Account.find(params[:account_id])
|
||||
@account = Account.without_requested_deletion.find(params[:account_id])
|
||||
end
|
||||
|
||||
def set_collection_item
|
||||
|
||||
@@ -69,7 +69,7 @@ class Api::V1::CollectionsController < Api::BaseController
|
||||
private
|
||||
|
||||
def set_account
|
||||
@account = Account.find(params[:account_id])
|
||||
@account = Account.without_requested_deletion.find(params[:account_id])
|
||||
end
|
||||
|
||||
def set_collections
|
||||
|
||||
@@ -25,7 +25,7 @@ class Api::V1::InCollectionsController < Api::BaseController
|
||||
private
|
||||
|
||||
def set_account
|
||||
@account = Account.find(params[:account_id])
|
||||
@account = Account.without_requested_deletion.find(params[:account_id])
|
||||
end
|
||||
|
||||
def set_collections
|
||||
|
||||
@@ -40,7 +40,7 @@ module AccountOwnedConcern
|
||||
def check_account_suspension
|
||||
if @account.permanently_unavailable?
|
||||
permanent_unavailability_response
|
||||
elsif @account.suspended? && !skip_temporary_suspension_response?
|
||||
elsif (@account.suspended? && !skip_temporary_suspension_response?) || (@account.deleted? && !skip_pending_deletion_response?)
|
||||
temporary_suspension_response
|
||||
end
|
||||
end
|
||||
@@ -49,6 +49,10 @@ module AccountOwnedConcern
|
||||
false
|
||||
end
|
||||
|
||||
def skip_pending_deletion_response?
|
||||
false
|
||||
end
|
||||
|
||||
def permanent_unavailability_response
|
||||
expires_in(3.minutes, public: true)
|
||||
gone
|
||||
|
||||
@@ -37,7 +37,7 @@ class Settings::DeletesController < Settings::BaseController
|
||||
end
|
||||
|
||||
def destroy_account!
|
||||
current_account.suspend!(origin: :local, block_email: false)
|
||||
current_account.mark_deleted!
|
||||
AccountDeletionWorker.perform_async(current_user.account_id)
|
||||
sign_out
|
||||
end
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
"account.name.copy": "Adresse kopieren",
|
||||
"account.name.help.domain": "{domain} ist der Server, auf dem dieser Profilname registriert ist und dessen Inhalte sich befinden.",
|
||||
"account.name.help.domain_self": "{domain} ist der Server, auf dem du registriert bist und deine Beiträge verwaltet werden.",
|
||||
"account.name.help.footer": "So wie du E-Mails an andere trotz unterschiedlicher E-Mail-Provider senden kannst, so kannst du auch mit anderen Profilen auf unterschiedlichen Mastodon Servern interagieren – das funktioniert auch bei allen Fediverse Apps.",
|
||||
"account.name.help.footer": "So wie du E-Mails an andere trotz unterschiedlicher E-Mail-Provider senden kannst, so kannst du auch mit anderen Profilen auf unterschiedlichen Mastodon-Servern interagieren – das funktioniert auch bei allen Fediverse-Apps!",
|
||||
"account.name.help.header": "Die Fediverse-Adresse ähnelt einer E-Mail-Adresse",
|
||||
"account.name.help.username": "{username} ist ein einmaliger Profilname auf diesem Server. Es ist möglich, dass jemand auf einem anderen Server den gleichen Profilnamen hat.",
|
||||
"account.name.help.username_self": "{username} ist dein Profilname auf diesem Server. Es ist möglich, dass jemand auf einem anderen Server den gleichen Profilnamen hat.",
|
||||
@@ -242,8 +242,8 @@
|
||||
"account_edit.upload_modal.title_add.header": "Titelbild hinzufügen",
|
||||
"account_edit.upload_modal.title_replace.avatar": "Profilbild ersetzen",
|
||||
"account_edit.upload_modal.title_replace.header": "Titelbild ersetzen",
|
||||
"account_edit.verified_modal.details": "Beweise die Echtheit deines Mastodon Profils, indem du verifizierte Links zu deinen persönlichen Websites ergänzt. So funktioniert’s:",
|
||||
"account_edit.verified_modal.invisible_link.details": "Füge den Link zu deiner Kopfzeile hinzu. Der wichtige Teil ist rel=\"me\", was Identitätsdiebstahl auf Websites mit nutzergenerierten Inhalten verhindert. Du kannst sogar ein Link-Tag im Header der Seite anstelle von {tag} verwenden, aber das HTML muss ohne die Ausführung von JavaScript zugänglich sein.",
|
||||
"account_edit.verified_modal.details": "Beweise die Echtheit deines Mastodon-Profils, indem du verifizierte Links zu deinen persönlichen Websites ergänzt. So funktioniert’s:",
|
||||
"account_edit.verified_modal.invisible_link.details": "Füge den Link in den Header ein. Der wichtige Teil ist rel=\"me\". Du kannst auch den Tag link im Header (statt {tag}) verwenden, jedoch muss die Internetseite ohne JavaScript abrufbar sein.",
|
||||
"account_edit.verified_modal.invisible_link.summary": "Wie blende ich den Link aus?",
|
||||
"account_edit.verified_modal.step1.header": "Kopiere den unten stehenden HTML-Code und füge ihn in den Header deiner Website ein",
|
||||
"account_edit.verified_modal.step2.details": "Wenn du deine Website bereits in ein Zusatzfeld eingetragen hast, musst du es noch einmal löschen und sie neu hinzufügen, damit die Verifizierung startet.",
|
||||
@@ -393,7 +393,7 @@
|
||||
"collections.create_collection": "Sammlung erstellen",
|
||||
"collections.delete_collection": "Sammlung löschen",
|
||||
"collections.description_length_hint": "Maximal 100 Zeichen",
|
||||
"collections.detail.author_added_you_on_date": "{author} Fügte dich am {date} hinzu",
|
||||
"collections.detail.author_added_you_on_date": "{author} fügte dich am {date} hinzu",
|
||||
"collections.detail.loading": "Sammlung wird geladen …",
|
||||
"collections.detail.revoke_inclusion": "Mich entfernen",
|
||||
"collections.detail.sensitive_content": "Inhaltswarnung",
|
||||
|
||||
@@ -69,6 +69,9 @@
|
||||
"account.hide_reblogs": "Slėpti pasidalinimus iš @{name}",
|
||||
"account.in_memoriam": "Atminimui.",
|
||||
"account.join_modal.day": "Diena",
|
||||
"account.join_modal.share.celebrate": "Bendrinti kolaboracinį įrašą",
|
||||
"account.join_modal.share.intro": "Pasidalinkite įvadiniu įrašu",
|
||||
"account.join_modal.share.welcome": "Pasidalinkite sveikinimo įrašu",
|
||||
"account.joined_short": "Prisijungė",
|
||||
"account.languages": "Keisti prenumeruojamas kalbas",
|
||||
"account.link_verified_on": "Šios nuorodos nuosavybė buvo patikrinta {date}",
|
||||
@@ -82,6 +85,7 @@
|
||||
"account.menu.copy": "Kopijuoti nuorodą",
|
||||
"account.menu.note.description": "Matoma tik jums",
|
||||
"account.menu.report": "Pranešti apie paskyrą",
|
||||
"account.menu.share": "Bendrinti…",
|
||||
"account.menu.unblock": "Atblokuoti paskyrą",
|
||||
"account.menu.unblock_domain": "Atblokuoti {domain}",
|
||||
"account.moved_to": "{name} nurodė, kad dabar jų nauja paskyra yra:",
|
||||
@@ -210,16 +214,19 @@
|
||||
"annual_report.summary.new_posts.new_posts": "nauji įrašai",
|
||||
"annual_report.summary.percentile.text": "<topLabel>Tai reiškia, kad esate tarp</topLabel><percentage></percentage><bottomLabel>populiariausių {domain} naudotojų.</bottomLabel>",
|
||||
"annual_report.summary.percentile.we_wont_tell_bernie": "Mes nesakysime Bernie.",
|
||||
"annual_report.summary.share_elsewhere": "Bendrinti kitur",
|
||||
"annual_report.summary.share_message": "Aš gavau „{archetype}“!",
|
||||
"annual_report.summary.share_on_mastodon": "Skelbti platformoje „Mastodon“",
|
||||
"attachments_list.unprocessed": "(neapdorotas)",
|
||||
"audio.hide": "Slėpti garsą",
|
||||
"block_modal.remote_users_caveat": "Paprašysime serverio {domain} gerbti tavo sprendimą. Tačiau atitiktis negarantuojama, nes kai kurie serveriai gali skirtingai tvarkyti blokavimus. Vieši įrašai vis tiek gali būti matomi neprisijungusiems naudotojams.",
|
||||
"block_modal.show_less": "Rodyti mažiau",
|
||||
"block_modal.show_more": "Rodyti daugiau",
|
||||
"block_modal.they_cant_mention": "Jūs negalite vienas kito paminėti, sekti ar dalintis įrašais.",
|
||||
"block_modal.they_will_know": "Jie gali matyti, kad yra užblokuoti.",
|
||||
"block_modal.title": "Blokuoti naudotoją?",
|
||||
"boost_modal.combo": "Galima paspausti {combo}, kad praleisti tai kitą kartą",
|
||||
"boost_modal.reblog": "Pasidalinti įrašą?",
|
||||
"boost_modal.reblog": "Dalintis įrašu?",
|
||||
"boost_modal.undo_reblog": "Nebepasidalinti įrašo?",
|
||||
"bundle_column_error.copy_stacktrace": "Kopijuoti klaidos ataskaitą",
|
||||
"bundle_column_error.error.body": "Paprašytos puslapio nepavyko atvaizduoti. Tai gali būti dėl mūsų kodo klaidos arba naršyklės suderinamumo problemos.",
|
||||
@@ -242,16 +249,45 @@
|
||||
"closed_registrations_modal.find_another_server": "Rasti kitą serverį",
|
||||
"closed_registrations_modal.preamble": "„Mastodon“ yra decentralizuotas, todėl nesvarbu, kur susikursi paskyrą, galėsi sekti ir bendrauti su bet kuriuo šiame serveryje esančiu asmeniu. Jį gali net savarankiškai talpinti!",
|
||||
"closed_registrations_modal.title": "Užsiregistruoti platformoje „Mastodon“",
|
||||
"collection.share_modal.share_link_label": "Bendrinti nuorodą",
|
||||
"collection.share_modal.share_via_post": "Skelbti platformoje „Mastodon“",
|
||||
"collection.share_modal.share_via_system": "Bendrinti į...",
|
||||
"collection.share_modal.title": "Bendrinti kolekciją",
|
||||
"collection.share_modal.title_new": "Bendrinti savo naują kolekciją!",
|
||||
"collection.share_template_other": "Pažvelkite į šią nuostabią kolekciją:",
|
||||
"collection.share_template_own": "Pažvelkite į mano naują kolekciją:",
|
||||
"collections.create.steps": "Žingsnis {step}/{total}",
|
||||
"collections.create_collection": "Sukurti kolekciją",
|
||||
"collections.delete_collection": "Ištrinti kolekciją",
|
||||
"collections.description_length_hint": "100 simbolių limitas",
|
||||
"collections.detail.author_added_you_on_date": "{author} pridėjo tave {date}",
|
||||
"collections.detail.loading": "Įkeliama kolekcija…",
|
||||
"collections.detail.revoke_inclusion": "Pašalinti mane",
|
||||
"collections.detail.sensitive_content": "Jautrus turinys",
|
||||
"collections.detail.sensitive_note": "Aprašymas ir paskyros gali būti netinkami visiems lankytojams.",
|
||||
"collections.detail.share": "Bendrinkite šią kolekciją",
|
||||
"collections.detail.you_are_in_this_collection": "Esate įtrauktas į šią kolekciją",
|
||||
"collections.edit_details": "Keisti detales",
|
||||
"collections.error_loading_collections": "Bandant įkelti šias kolekcijas įvyko klaida.",
|
||||
"collections.hidden_accounts_description": "Jūs užblokavote arba nutildėte {count, plural, one {šią paskyrą} few {šias paskyras} many {paskyrų} other {šias paskyras}}",
|
||||
"collections.hints.accounts_counter": "{count}/{max} paskyrų",
|
||||
"collections.last_updated_at": "Paskutinį kartą atnaujinta: {date}",
|
||||
"collections.list.collections_with_count": "{count, plural, one {# Kolekcija} few {# Kolekcijos} many {# Kolekcijų} other {# Kolekcijos}}",
|
||||
"collections.list.created_by_author": "Sukūrė {name}",
|
||||
"collections.list.created_by_you": "Sukūrėte jūs",
|
||||
"collections.list.featuring_you": "Jūs įtraukti",
|
||||
"collections.manage_accounts": "Tvarkyti paskyras",
|
||||
"collections.mark_as_sensitive": "Pažymėti kaip jautrią informaciją",
|
||||
"collections.name_length_hint": "40 simbolių limitas",
|
||||
"collections.search_accounts_label": "Ieškokite paskyros, kurią norite pridėti",
|
||||
"collections.share_short": "Bendrinti",
|
||||
"collections.topic_special_chars_hint": "Išsaugant bus pašalinti specialieji simboliai",
|
||||
"column.about": "Apie",
|
||||
"column.blocks": "Užblokuoti naudotojai",
|
||||
"column.bookmarks": "Žymės",
|
||||
"column.community": "Vietinė laiko skalė",
|
||||
"column.create_list": "Kurti sąrašą",
|
||||
"column.direct": "Paminėjimai",
|
||||
"column.direct": "Žinutės",
|
||||
"column.directory": "Naršyti profilius",
|
||||
"column.domain_blocks": "Užblokuoti serveriai",
|
||||
"column.edit_list": "Redaguoti sąrašą",
|
||||
@@ -341,7 +377,7 @@
|
||||
"confirmations.quiet_post_quote_info.dismiss": "Daugiau man nepriminti",
|
||||
"confirmations.quiet_post_quote_info.got_it": "Supratau",
|
||||
"confirmations.quiet_post_quote_info.message": "Kai norite komentuoti užtildytą viešą įrašą, jūsų įrašas bus paslėptas „Populiaru“ sąrašuose.",
|
||||
"confirmations.quiet_post_quote_info.title": "Kai paminite tylius viešus įrašus",
|
||||
"confirmations.quiet_post_quote_info.title": "Kai cituojate nutildytus viešus įrašus",
|
||||
"confirmations.redraft.confirm": "Ištrinti ir iš naujo parengti",
|
||||
"confirmations.redraft.message": "Ar tikrai nori ištrinti šį įrašą ir parengti jį iš naujo? Bus prarasti mėgstami ir pasidalinimai, o atsakymai į originalų įrašą bus panaikinti.",
|
||||
"confirmations.redraft.title": "Ištrinti ir iš naujo parengti įrašą?",
|
||||
@@ -520,8 +556,8 @@
|
||||
"hints.profiles.see_more_followers": "Žiūrėti daugiau sekėjų serveryje {domain}",
|
||||
"hints.profiles.see_more_follows": "Žiūrėti daugiau sekimų serveryje {domain}",
|
||||
"hints.profiles.see_more_posts": "Žiūrėti daugiau įrašų serveryje {domain}",
|
||||
"home.column_settings.show_quotes": "Rodyti komentarus",
|
||||
"home.column_settings.show_reblogs": "Rodyti pakėlimus",
|
||||
"home.column_settings.show_quotes": "Rodyti citavimus",
|
||||
"home.column_settings.show_reblogs": "Rodyti pasidalinimus",
|
||||
"home.column_settings.show_replies": "Rodyti atsakymus",
|
||||
"home.hide_announcements": "Slėpti skelbimus",
|
||||
"home.pending_critical_update.body": "Kuo greičiau atnaujink savo Mastodon serverį.",
|
||||
@@ -575,7 +611,7 @@
|
||||
"keyboard_shortcuts.open_media": "Atidaryti mediją",
|
||||
"keyboard_shortcuts.pinned": "Atverti prisegtų įrašų sąrašą",
|
||||
"keyboard_shortcuts.profile": "Atidaryti autoriaus (-ės) profilį",
|
||||
"keyboard_shortcuts.quote": "Komentuoti įrašą",
|
||||
"keyboard_shortcuts.quote": "Cituoti įrašą",
|
||||
"keyboard_shortcuts.reply": "Atsakyti į įrašą",
|
||||
"keyboard_shortcuts.requests": "Atidaryti sekimo prašymų sąrašą",
|
||||
"keyboard_shortcuts.search": "Fokusuoti paieškos juostą",
|
||||
@@ -643,7 +679,7 @@
|
||||
"navigation_bar.automated_deletion": "Automatinis įrašų ištrynimas",
|
||||
"navigation_bar.blocks": "Užblokuoti naudotojai",
|
||||
"navigation_bar.bookmarks": "Žymės",
|
||||
"navigation_bar.direct": "Paminėjimai",
|
||||
"navigation_bar.direct": "Žinutės",
|
||||
"navigation_bar.domain_blocks": "Užblokuoti domenai",
|
||||
"navigation_bar.favourites": "Mėgstami",
|
||||
"navigation_bar.filters": "Nutildyti žodžiai",
|
||||
@@ -688,7 +724,7 @@
|
||||
"notification.label.mention": "Paminėjimas",
|
||||
"notification.label.private_mention": "Privatus paminėjimas",
|
||||
"notification.label.private_reply": "Privatus atsakymas",
|
||||
"notification.label.quote": "{name} pakomentavo jūsų įrašą",
|
||||
"notification.label.quote": "{name} pacitavo jūsų įrašą",
|
||||
"notification.label.reply": "Atsakymas",
|
||||
"notification.mention": "Paminėjimas",
|
||||
"notification.mentioned_you": "{name} paminėjo jus",
|
||||
@@ -703,7 +739,7 @@
|
||||
"notification.moderation_warning.action_suspend": "Tavo paskyra buvo sustabdyta.",
|
||||
"notification.own_poll": "Tavo apklausa baigėsi",
|
||||
"notification.poll": "Baigėsi apklausa, kurioje balsavai",
|
||||
"notification.quoted_update": "{name} redagavo jūsų pakomentuotą įrašą",
|
||||
"notification.quoted_update": "{name} redagavo jūsų pacituotą įrašą",
|
||||
"notification.reblog": "{name} dalinosi tavo įrašu",
|
||||
"notification.reblog.name_and_others_with_link": "{name} ir <a>{count, plural,one {dar kažkas} few {# kiti} other {# kitų}}</a> pasidalino tavo įrašu",
|
||||
"notification.relationships_severance_event": "Prarasti sąryšiai su {name}",
|
||||
@@ -744,10 +780,10 @@
|
||||
"notifications.column_settings.follow": "Nauji sekėjai:",
|
||||
"notifications.column_settings.follow_request": "Nauji sekimo prašymai:",
|
||||
"notifications.column_settings.group": "Grupė",
|
||||
"notifications.column_settings.mention": "Paminėjimai:",
|
||||
"notifications.column_settings.mention": "Žinutės:",
|
||||
"notifications.column_settings.poll": "Balsavimo rezultatai:",
|
||||
"notifications.column_settings.push": "Tiesioginiai pranešimai",
|
||||
"notifications.column_settings.quote": "Komentarai:",
|
||||
"notifications.column_settings.quote": "Citavimai:",
|
||||
"notifications.column_settings.reblog": "Pasidalinimai:",
|
||||
"notifications.column_settings.show": "Rodyti stulpelyje",
|
||||
"notifications.column_settings.sound": "Paleisti garsą",
|
||||
@@ -783,7 +819,7 @@
|
||||
"notifications.policy.filter_not_following_hint": "Kol jų nepatvirtinsi rankiniu būdu",
|
||||
"notifications.policy.filter_not_following_title": "Žmonių, kuriuos neseki",
|
||||
"notifications.policy.filter_private_mentions_hint": "Filtruojama, išskyrus atsakymus į tavo paties paminėjimą arba jei seki siuntėją",
|
||||
"notifications.policy.filter_private_mentions_title": "Nepageidaujami asmens paminėjimai",
|
||||
"notifications.policy.filter_private_mentions_title": "Nepageidaujamos žinutės",
|
||||
"notifications.policy.title": "Tvarkyti pranešimus iš…",
|
||||
"notifications_permission_banner.enable": "Įjungti darbalaukio pranešimus",
|
||||
"notifications_permission_banner.how_to_control": "Jei nori gauti pranešimus, kai Mastodon nėra atidarytas, įjunk darbalaukio pranešimus. Įjungęs (-usi) darbalaukio pranešimus, gali tiksliai valdyti, kokių tipų sąveikos generuoja darbalaukio pranešimus, naudojant pirmiau esančiu mygtuku {icon}.",
|
||||
@@ -821,16 +857,16 @@
|
||||
"privacy.private.short": "Sekėjai",
|
||||
"privacy.public.long": "Bet kas iš Mastodon ir ne Mastodon",
|
||||
"privacy.public.short": "Vieša",
|
||||
"privacy.quote.anyone": "{visibility}, komentarai galimi",
|
||||
"privacy.quote.disabled": "{visibility}, komentavimas išjungtas",
|
||||
"privacy.quote.limited": "{visibility}, komentavimas apribotas",
|
||||
"privacy.quote.anyone": "{visibility}, citavimai galimi",
|
||||
"privacy.quote.disabled": "{visibility}, išjungtas citavimas",
|
||||
"privacy.quote.limited": "{visibility}, apribotas citavimas",
|
||||
"privacy.unlisted.additional": "Tai veikia lygiai taip pat, kaip ir vieša, tik įrašas nebus rodomas tiesioginiuose srautuose, grotažymėse, naršyme ar Mastodon paieškoje, net jei esi įtraukęs (-usi) visą paskyrą.",
|
||||
"privacy.unlisted.long": "Paslėptas nuo „Mastodon“ paieškos rezultatų, tendencijų ir viešų įrašų sienų",
|
||||
"privacy.unlisted.short": "Tyliai vieša",
|
||||
"privacy_policy.last_updated": "Paskutinį kartą atnaujinta {date}",
|
||||
"privacy_policy.title": "Privatumo politika",
|
||||
"quote_error.edit": "Komentuoti negalima, kai keičiamas įrašas.",
|
||||
"quote_error.poll": "Komentuoti apklausose negalima.",
|
||||
"quote_error.edit": "Cituoti negalima, kai keičiamas įrašas.",
|
||||
"quote_error.poll": "Cituoti apklausose negalima.",
|
||||
"quote_error.private_mentions": "Komentuoti privačius paminėjimus nėra leidžiama.",
|
||||
"quote_error.quote": "Leidžiama pateikti tik vieną komentarą vienu metu.",
|
||||
"quote_error.unauthorized": "Jums neleidžiama komentuoti šio įrašo.",
|
||||
@@ -852,7 +888,7 @@
|
||||
"relative_time.today": "šiandien",
|
||||
"remove_quote_hint.button_label": "Supratau",
|
||||
"remove_quote_hint.message": "Tai galite padaryti iš {icon} parinkčių meniu.",
|
||||
"remove_quote_hint.title": "Norite pašalinti savo komentarą?",
|
||||
"remove_quote_hint.title": "Norite pašalinti savo komentarą prie cituojamo įrašo?",
|
||||
"reply_indicator.attachments": "{count, plural, one {# priedas} few {# priedai} many {# priedo} other {# priedų}}",
|
||||
"reply_indicator.cancel": "Atšaukti",
|
||||
"reply_indicator.poll": "Apklausa",
|
||||
@@ -942,7 +978,7 @@
|
||||
"status.admin_account": "Atidaryti prižiūrėjimo sąsają @{name}",
|
||||
"status.admin_domain": "Atidaryti prižiūrėjimo sąsają {domain}",
|
||||
"status.admin_status": "Atidaryti šį įrašą prižiūrėjimo sąsajoje",
|
||||
"status.all_disabled": "Įrašo pasidalijimai ir komentavimai išjungti",
|
||||
"status.all_disabled": "Įrašo pasidalijimai ir citavimai išjungti",
|
||||
"status.block": "Blokuoti @{name}",
|
||||
"status.bookmark": "Žymė",
|
||||
"status.cancel_reblog_private": "Nesidalinti",
|
||||
@@ -979,10 +1015,11 @@
|
||||
"status.more": "Daugiau",
|
||||
"status.mute": "Nutildyti @{name}",
|
||||
"status.mute_conversation": "Nutildyti pokalbį",
|
||||
"status.not_quoted": "Šiame įraše Jūs nesate paminėtas",
|
||||
"status.open": "Išskleisti šį įrašą",
|
||||
"status.pin": "Prisegti prie profilio",
|
||||
"status.quote": "Komentuoti",
|
||||
"status.quote.cancel": "Atšaukti komentarą",
|
||||
"status.quote": "Cituoti su komentaru",
|
||||
"status.quote.cancel": "Atšaukti citavimą",
|
||||
"status.quote_error.blocked_account_hint.title": "Šis įrašas yra paslėptas, nes jūs esate užblokavę @{name}.",
|
||||
"status.quote_error.blocked_domain_hint.title": "Šis įrašas yra paslėptas, nes jūs užblokavote {domain}.",
|
||||
"status.quote_error.filtered": "Paslėpta dėl vieno iš jūsų filtrų",
|
||||
@@ -995,13 +1032,13 @@
|
||||
"status.quote_error.revoked": "Autorius pašalino įrašą",
|
||||
"status.quote_followers_only": "Tik sekėjai gali cituoti šį įrašą",
|
||||
"status.quote_manual_review": "Autorius atskirai įvertins paskelbimą",
|
||||
"status.quote_noun": "Paminėjimas",
|
||||
"status.quote_noun": "Citata",
|
||||
"status.quote_policy_change": "Keisti, kas gali cituoti",
|
||||
"status.quote_post_author": "Paminėjo įrašą iš @{name}",
|
||||
"status.quote_private": "Privačių įrašų negalima komentuoti",
|
||||
"status.quotes.empty": "Šio įrašo dar niekas nepakomentavo. Kai kas nors tai padarys, jie bus rodomi čia.",
|
||||
"status.quotes.local_other_disclaimer": "Autoriaus atmesti įrašo komentavimai nebus rodomi.",
|
||||
"status.quotes.remote_other_disclaimer": "Čia bus rodoma tik komentavimai iš {domain}. Autoriaus atmesti įrašo komentavimai nebus rodomi.",
|
||||
"status.quotes.local_other_disclaimer": "Autoriaus atmesti įrašo citavimai nebus rodomi.",
|
||||
"status.quotes.remote_other_disclaimer": "Čia bus rodoma tik citavimai iš {domain}. Autoriaus atmesti įrašo komentarai nebus rodomi.",
|
||||
"status.quotes_count": "{count, plural, one {{counter} komentaras} few {{counter} komentarai} many {{counter} komentarų} other {{counter} komentarai}}",
|
||||
"status.read_more": "Skaityti daugiau",
|
||||
"status.reblog": "Dalintis",
|
||||
@@ -1058,7 +1095,7 @@
|
||||
"upload_button.label": "Pridėti vaizdų, vaizdo įrašą arba garso failą",
|
||||
"upload_error.limit": "Viršyta failo įkėlimo riba.",
|
||||
"upload_error.poll": "Failų įkėlimas neleidžiamas su apklausomis.",
|
||||
"upload_error.quote": "Komentuojant įrašą failo įkėlimas negalimas.",
|
||||
"upload_error.quote": "Cituojant įrašą, failo įkėlimas negalimas.",
|
||||
"upload_form.drag_and_drop.instructions": "Kad paimtum medijos priedą, paspausk tarpo arba įvedimo klavišą. Tempant naudok rodyklių klavišus, kad perkeltum medijos priedą bet kuria kryptimi. Dar kartą paspausk tarpo arba įvedimo klavišą, kad nuleistum medijos priedą naujoje vietoje, arba paspausk grįžimo klavišą, kad atšauktum.",
|
||||
"upload_form.drag_and_drop.on_drag_cancel": "Nutempimas buvo atšauktas. Medijos priedas {item} buvo nuleistas.",
|
||||
"upload_form.drag_and_drop.on_drag_end": "Medijos priedas {item} buvo nuleistas.",
|
||||
@@ -1084,7 +1121,7 @@
|
||||
"video.volume_up": "Pagarsinti",
|
||||
"visibility_modal.button_title": "Nustatyti matomumą",
|
||||
"visibility_modal.direct_quote_warning.text": "Jei išsaugosite dabartinius nustatymus, įterptas (embeded) komentaras bus konvertuotas į nuorodą.",
|
||||
"visibility_modal.direct_quote_warning.title": "Komentarai negali būti įterpiami į privačius paminėjimus",
|
||||
"visibility_modal.direct_quote_warning.title": "Citavimai negali būti įterpiami į privačius paminėjimus",
|
||||
"visibility_modal.header": "Matomumas ir sąveika",
|
||||
"visibility_modal.helper.direct_quoting": "Privatūs paminėjimai su žyma @, parašyti platformoje „Mastodon“, negali būti komentuojami kitų.",
|
||||
"visibility_modal.helper.privacy_editing": "Matomumo nustatymai negali būti keičiami po to, kai įrašas yra paskelbtas.",
|
||||
|
||||
@@ -15,7 +15,7 @@ class ActivityPub::Activity::Flag < ActivityPub::Activity
|
||||
target_collections = target_collections_by_account.fetch(target_account.id, [])
|
||||
replied_to_accounts = target_statuses.nil? ? [] : Account.local.where(id: target_statuses.filter_map(&:in_reply_to_account_id))
|
||||
|
||||
next if target_account.suspended? || (!target_account.local? && replied_to_accounts.none?)
|
||||
next if target_account.suspended? || target_account.permanently_deleted? || (!target_account.local? && replied_to_accounts.none?)
|
||||
|
||||
ReportService.new.call(
|
||||
@account,
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
# private_key :text
|
||||
# protocol :integer default("ostatus"), not null
|
||||
# public_key :text default(""), not null
|
||||
# requested_deletion_at :datetime
|
||||
# requested_review_at :datetime
|
||||
# reviewed_at :datetime
|
||||
# sensitized_at :datetime
|
||||
@@ -285,6 +286,21 @@ class Account < ApplicationRecord
|
||||
ResolveAccountService.new.call(acct) unless local?
|
||||
end
|
||||
|
||||
def deleted?
|
||||
requested_deletion_at.present? && !instance_actor?
|
||||
end
|
||||
|
||||
def permanently_deleted?
|
||||
deleted? && deletion_request.nil?
|
||||
end
|
||||
|
||||
def mark_deleted!(date: Time.now.utc)
|
||||
transaction do
|
||||
create_deletion_request!
|
||||
update!(requested_deletion_at: date)
|
||||
end
|
||||
end
|
||||
|
||||
def memorialize!
|
||||
update!(memorial: true)
|
||||
end
|
||||
|
||||
@@ -57,7 +57,7 @@ module Account::Search
|
||||
LEFT JOIN users ON accounts.id = users.account_id
|
||||
LEFT JOIN account_stats AS s ON accounts.id = s.account_id
|
||||
WHERE to_tsquery('simple', :tsquery) @@ #{TEXT_SEARCH_RANKS}
|
||||
AND accounts.suspended_at IS NULL
|
||||
AND accounts.suspended_at IS NULL AND accounts.requested_deletion_at IS NULL
|
||||
AND accounts.moved_to_account_id IS NULL
|
||||
AND (accounts.domain IS NOT NULL OR (users.approved = TRUE AND users.confirmed_at IS NOT NULL))
|
||||
ORDER BY rank DESC
|
||||
@@ -80,7 +80,7 @@ module Account::Search
|
||||
LEFT JOIN account_stats AS s ON accounts.id = s.account_id
|
||||
WHERE accounts.id IN (SELECT * FROM first_degree)
|
||||
AND to_tsquery('simple', :tsquery) @@ #{TEXT_SEARCH_RANKS}
|
||||
AND accounts.suspended_at IS NULL
|
||||
AND accounts.suspended_at IS NULL AND accounts.requested_deletion_at IS NULL
|
||||
AND accounts.moved_to_account_id IS NULL
|
||||
GROUP BY accounts.id, s.id
|
||||
ORDER BY rank DESC
|
||||
@@ -98,7 +98,7 @@ module Account::Search
|
||||
LEFT JOIN users ON accounts.id = users.account_id
|
||||
LEFT JOIN account_stats AS s ON accounts.id = s.account_id
|
||||
WHERE to_tsquery('simple', :tsquery) @@ #{TEXT_SEARCH_RANKS}
|
||||
AND accounts.suspended_at IS NULL
|
||||
AND accounts.suspended_at IS NULL AND accounts.requested_deletion_at IS NULL
|
||||
AND accounts.moved_to_account_id IS NULL
|
||||
AND (accounts.domain IS NOT NULL OR (users.approved = TRUE AND users.confirmed_at IS NOT NULL))
|
||||
GROUP BY accounts.id, s.id
|
||||
|
||||
@@ -5,13 +5,13 @@ module Account::Suspensions
|
||||
|
||||
included do
|
||||
scope :suspended, -> { where.not(suspended_at: nil) }
|
||||
scope :without_suspended, -> { where(suspended_at: nil) }
|
||||
scope :without_requested_deletion, -> { where(requested_deletion_at: nil) }
|
||||
scope :without_suspended, -> { without_requested_deletion.where(suspended_at: nil) }
|
||||
end
|
||||
|
||||
def suspended?
|
||||
suspended_at.present? && !instance_actor?
|
||||
end
|
||||
alias unavailable? suspended?
|
||||
|
||||
def suspended_locally?
|
||||
suspended? && suspension_origin_local?
|
||||
@@ -20,12 +20,19 @@ module Account::Suspensions
|
||||
def suspended_permanently?
|
||||
suspended? && deletion_request.nil?
|
||||
end
|
||||
alias permanently_unavailable? suspended_permanently?
|
||||
|
||||
def suspended_temporarily?
|
||||
suspended? && deletion_request.present?
|
||||
end
|
||||
|
||||
def unavailable?
|
||||
deleted? || suspended?
|
||||
end
|
||||
|
||||
def permanently_unavailable?
|
||||
unavailable? && deletion_request.nil?
|
||||
end
|
||||
|
||||
def suspend!(date: Time.now.utc, origin: :local, block_email: true)
|
||||
transaction do
|
||||
create_deletion_request!
|
||||
|
||||
+2
-2
@@ -102,13 +102,13 @@ class User < ApplicationRecord
|
||||
validates :date_of_birth, presence: true, date_of_birth: true, on: :create, if: -> { Setting.min_age.present? && !bypass_registration_checks? }
|
||||
validate :validate_role_elevation
|
||||
|
||||
scope :account_not_suspended, -> { joins(:account).merge(Account.without_suspended) }
|
||||
scope :account_available, -> { joins(:account).merge(Account.without_suspended.without_requested_deletion) }
|
||||
scope :recent, -> { order(id: :desc) }
|
||||
scope :pending, -> { where(approved: false) }
|
||||
scope :approved, -> { where(approved: true) }
|
||||
scope :enabled, -> { where(disabled: false) }
|
||||
scope :disabled, -> { where(disabled: true) }
|
||||
scope :active, -> { confirmed.signed_in_recently.account_not_suspended }
|
||||
scope :active, -> { confirmed.signed_in_recently.account_available }
|
||||
scope :matches_email, ->(value) { where(arel_table[:email].matches("#{value}%")) }
|
||||
scope :matches_ip, ->(value) { left_joins(:ips).merge(UserIp.contained_by(value)).group(users: [:id]) }
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ class REST::AccountSerializer < ActiveModel::Serializer
|
||||
|
||||
has_many :emojis, serializer: REST::CustomEmojiSerializer
|
||||
|
||||
attribute :suspended, if: :suspended?
|
||||
attribute :suspended, if: :unavailable?
|
||||
attribute :silenced, key: :limited, if: :silenced?
|
||||
attribute :noindex, if: :local?
|
||||
|
||||
@@ -168,7 +168,7 @@ class REST::AccountSerializer < ActiveModel::Serializer
|
||||
object.user_prefers_noindex?
|
||||
end
|
||||
|
||||
delegate :suspended?, :silenced?, :local?, :memorial?, to: :object
|
||||
delegate :unavailable?, :silenced?, :local?, :memorial?, to: :object
|
||||
|
||||
def moved_and_not_nested?
|
||||
object.moved?
|
||||
|
||||
@@ -226,9 +226,14 @@ class DeleteAccountService < BaseService
|
||||
|
||||
return unless keep_account_record?
|
||||
|
||||
if @options[:suspended_at]
|
||||
@account.suspended_at = @options[:suspended_at]
|
||||
@account.suspension_origin = :local
|
||||
else
|
||||
@account.requested_deletion_at ||= Time.now.utc
|
||||
end
|
||||
|
||||
@account.silenced_at = nil
|
||||
@account.suspended_at = @options[:suspended_at] || Time.now.utc
|
||||
@account.suspension_origin = :local
|
||||
@account.locked = false
|
||||
@account.memorial = false
|
||||
@account.discoverable = false
|
||||
|
||||
@@ -8,6 +8,10 @@
|
||||
= link_to t('admin.accounts.redownload'), redownload_admin_account_path(account.id), method: :post, class: 'button' if can?(:redownload, account) && account.suspension_origin_remote?
|
||||
- if deletion_request.present? && can?(:destroy, account)
|
||||
= link_to t('admin.accounts.delete'), admin_account_path(account.id), method: :delete, class: 'button button--destructive', data: { confirm: t('admin.accounts.are_you_sure') }
|
||||
- elsif account.deleted?
|
||||
%hr.spacer/
|
||||
|
||||
%p.muted-hint= deletion_request.present? ? t('admin.accounts.deletion_reversible_hint_html', date: content_tag(:strong, l(deletion_request.due_at.to_date))) : t('admin.accounts.deletion_irreversible')
|
||||
- else
|
||||
.action-buttons
|
||||
%div
|
||||
|
||||
@@ -22,12 +22,12 @@
|
||||
%div
|
||||
= link_to admin_action_logs_path(target_account_id: account.id) do
|
||||
.dashboard__counters__text
|
||||
- if account.local? && account.user.nil?
|
||||
- if account.suspended?
|
||||
= t('admin.accounts.suspended')
|
||||
- elsif account.deleted? || (account.local? && account.user.nil?)
|
||||
= t('admin.accounts.deleted')
|
||||
- elsif account.memorial?
|
||||
= t('admin.accounts.memorialized')
|
||||
- elsif account.suspended?
|
||||
= t('admin.accounts.suspended')
|
||||
- elsif account.silenced?
|
||||
= t('admin.accounts.silenced')
|
||||
- elsif account.local? && account.user_disabled?
|
||||
|
||||
@@ -39,6 +39,8 @@
|
||||
%br/
|
||||
- if target_account.suspended?
|
||||
%span.red= t('admin.accounts.suspended')
|
||||
- elsif target_account.deleted?
|
||||
%span.red= t('admin.accounts.deleted')
|
||||
- elsif target_account.silenced?
|
||||
%span.red= t('admin.accounts.silenced')
|
||||
- elsif target_account.user_disabled?
|
||||
|
||||
@@ -36,7 +36,7 @@ class Scheduler::SelfDestructScheduler
|
||||
# deletion request.
|
||||
|
||||
# This targets accounts that have not been deleted nor marked for deletion yet
|
||||
Account.local.without_suspended.reorder(id: :asc).take(MAX_ACCOUNT_DELETIONS_PER_JOB).each do |account|
|
||||
Account.local.without_requested_deletion.reorder(id: :asc).take(MAX_ACCOUNT_DELETIONS_PER_JOB).each do |account|
|
||||
delete_account!(account)
|
||||
end
|
||||
|
||||
@@ -44,9 +44,8 @@ class Scheduler::SelfDestructScheduler
|
||||
|
||||
# This targets accounts that have been marked for deletion but have not been
|
||||
# deleted yet
|
||||
Account.local.suspended.joins(:deletion_request).take(MAX_ACCOUNT_DELETIONS_PER_JOB).each do |account|
|
||||
Account.local.joins(:deletion_request).take(MAX_ACCOUNT_DELETIONS_PER_JOB).each do |account|
|
||||
delete_account!(account)
|
||||
account.deletion_request&.destroy
|
||||
end
|
||||
end
|
||||
|
||||
@@ -64,8 +63,9 @@ class Scheduler::SelfDestructScheduler
|
||||
[json, account.id, inbox_url]
|
||||
end
|
||||
|
||||
# Do not call `Account#suspend!` because we don't want to issue a deletion request
|
||||
account.update!(suspended_at: Time.now.utc, suspension_origin: :local)
|
||||
# Do not call `Account#mark_deleted!` because we don't want to issue a deletion request
|
||||
account.update!(requested_deletion_at: Time.now.utc)
|
||||
account.deletion_request&.destroy
|
||||
end
|
||||
|
||||
def deletion_payload(account)
|
||||
|
||||
@@ -64,6 +64,8 @@ en:
|
||||
custom: Custom
|
||||
delete: Delete data
|
||||
deleted: Deleted
|
||||
deletion_irreversible: The data of this account has been irreversibly deleted.
|
||||
deletion_reversible_hint_html: This account is pending deletion, and the data will be fully removed on %{date}.
|
||||
demote: Demote
|
||||
destroyed_msg: "%{username}'s data is now queued to be deleted imminently"
|
||||
disable: Freeze
|
||||
|
||||
@@ -659,7 +659,7 @@ lt:
|
||||
no_status_selected: Jokie įrašai nebuvo pakeisti, nes nė vienas buvo pasirinktas
|
||||
open: Atidaryti įrašą
|
||||
original_status: Originalus įrašas
|
||||
quotes: Paminėjimai
|
||||
quotes: Citavimai
|
||||
replied_to_html: Atsakyta į %{acct_link}
|
||||
status_title: Paskelbė @%{name}
|
||||
title: Paskyros įrašai – @%{name}
|
||||
@@ -1131,6 +1131,8 @@ lt:
|
||||
body: 'Tavo įrašą paminėjo %{name}:'
|
||||
subject: "%{name} paminėjo jūsų įrašą"
|
||||
title: Naujas paminėjimas
|
||||
quoted_update:
|
||||
subject: "%{name} redagavo jūsų pasidalintą įrašą"
|
||||
reblog:
|
||||
body: 'Tavo įrašą dalinosi %{name}:'
|
||||
subject: "%{name} dalinosi tavo įrašu"
|
||||
|
||||
@@ -83,7 +83,7 @@ lt:
|
||||
app_icon: WEBP, PNG, GIF arba JPG. Pakeičia numatytąją programos piktogramą mobiliuosiuose įrenginiuose pasirinktine piktograma.
|
||||
backups_retention_period: Naudotojai gali generuoti savo įrašų archyvus, kuriuos vėliau galės atsisiųsti. Nustačius teigiamą reikšmę, šie archyvai po nurodyto dienų skaičiaus bus automatiškai ištrinti iš saugyklos.
|
||||
bootstrap_timeline_accounts: Šios paskyros bus rekomenduojamos naujiems naudotojams Rekomenduojami sekimai skyrelyje. Pateikite rekomenduojamas paskyras, atskirtas kableliais.
|
||||
content_cache_retention_period: Visi įrašai iš kitų serverių (įskaitant pakėlimus ir atsakymus) bus ištrinti po nurodyto dienų skaičiaus, neatsižvelgiant į bet kokią vietinio naudotojo sąveiką su tais įrašais. Tai taikoma ir tiems įrašams, kuriuos vietinis naudotojas yra pažymėjęs kaip žymes ar mėgstamus. Privačios paminėjimai tarp naudotojų iš skirtingų instancijų taip pat bus prarastos ir jų bus neįmanoma atkurti. Šis nustatymas skirtas naudoti ypatingos paskirties instancijose, o įgyvendinus jį bendram naudojimui, pažeidžiami daugelio naudotojų lūkesčiai.
|
||||
content_cache_retention_period: Visi įrašai iš kitų serverių (įskaitant pakėlimus ir atsakymus) bus ištrinti po nurodyto dienų skaičiaus, neatsižvelgiant į bet kokią vietinio naudotojo sąveiką su tais įrašais. Tai taikoma ir tiems įrašams, kuriuos vietinis naudotojas yra pažymėjęs kaip žymes ar mėgstamus. Privačios žinutės tarp naudotojų iš skirtingų instancijų taip pat bus prarastos ir jų bus neįmanoma atkurti. Šis nustatymas skirtas naudoti ypatingos paskirties instancijose, o įgyvendinus jį bendram naudojimui, pažeidžiami daugelio naudotojų lūkesčiai.
|
||||
favicon: WEBP, PNG, GIF arba JPG. Pakeičia numatytąją Mastodon svetaines piktogramą pasirinktine piktograma.
|
||||
mascot: Pakeičia išplėstinės žiniatinklio sąsajos iliustraciją.
|
||||
media_cache_retention_period: Nuotolinių naudotojų įrašytų įrašų medijos failai talpinami tavo serveryje. Nustačius teigiamą reikšmę, medijos bus ištrinamos po nurodyto dienų skaičiaus. Jei medijos duomenų bus paprašyta po to, kai jie bus ištrinti, jie bus atsiųsti iš naujo, jei šaltinio turinys vis dar prieinamas. Dėl apribojimų, susijusių su nuorodų peržiūros kortelių apklausos dažnumu trečiųjų šalių svetainėse, rekomenduojama nustatyti šią reikšmę ne trumpesnę kaip 14 dienų, kitaip nuorodų peržiūros kortelės nebus atnaujinamos pagal pareikalavimą iki to laiko.
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class AddRequestedDeletionAtToAccounts < ActiveRecord::Migration[8.0]
|
||||
def change
|
||||
add_column :accounts, :requested_deletion_at, :datetime
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,26 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class UpdateAccountSummariesToVersion3 < ActiveRecord::Migration[8.0]
|
||||
def up
|
||||
reapplication_global_follow_recommendations_v1 do
|
||||
drop_view :account_summaries, materialized: true
|
||||
create_view :account_summaries, version: 3, materialized: { no_data: true }
|
||||
safety_assured { add_index :account_summaries, :account_id, unique: true }
|
||||
end
|
||||
end
|
||||
|
||||
def down
|
||||
reapplication_global_follow_recommendations_v1 do
|
||||
drop_view :account_summaries, materialized: true
|
||||
create_view :account_summaries, version: 2, materialized: { no_data: true }
|
||||
safety_assured { add_index :account_summaries, :account_id, unique: true }
|
||||
end
|
||||
end
|
||||
|
||||
def reapplication_global_follow_recommendations_v1
|
||||
drop_view :global_follow_recommendations, materialized: true
|
||||
yield
|
||||
create_view :global_follow_recommendations, version: 1, materialized: { no_data: true }
|
||||
safety_assured { add_index :global_follow_recommendations, :account_id, unique: true }
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,29 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class BackfillAccountRequestedDeletionAt < ActiveRecord::Migration[8.1]
|
||||
def up
|
||||
safety_assured do
|
||||
execute <<~SQL
|
||||
UPDATE
|
||||
accounts
|
||||
SET
|
||||
requested_deletion_at = suspended_at, suspended_at = NULL, suspension_origin = NULL
|
||||
WHERE
|
||||
-- rule out remote accounts, as deleted remote accounts are deleted locally
|
||||
domain IS NULL
|
||||
-- only care about accounts marked as suspended (which prior to this migration applies to both suspended and self-deleted accounts)
|
||||
AND suspended_at IS NOT NULL
|
||||
-- rule accounts that were not self-deleted (might still include suspended but self-deleted accounts)
|
||||
AND NOT EXISTS (SELECT 1 FROM users WHERE account_id = accounts.id) AND NOT EXISTS (SELECT 1 FROM canonical_email_blocks WHERE reference_account_id = accounts.id)
|
||||
-- rule out accounts that have a canonical email block: sign they were suspended and not unsuspended
|
||||
AND NOT EXISTS (SELECT 1 FROM canonical_email_blocks WHERE reference_account_id = accounts.id)
|
||||
SQL
|
||||
end
|
||||
end
|
||||
|
||||
def down
|
||||
safety_assured do
|
||||
execute 'UPDATE accounts SET suspended_at = requested_deletion_at WHERE domain is NULL AND suspended_at IS NULL AND requested_deletion_at IS NOT NULL'
|
||||
end
|
||||
end
|
||||
end
|
||||
+3
-3
@@ -10,7 +10,7 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema[8.1].define(version: 2026_07_20_124731) do
|
||||
ActiveRecord::Schema[8.1].define(version: 2026_07_28_145507) do
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "pg_catalog.plpgsql"
|
||||
|
||||
@@ -192,6 +192,7 @@ ActiveRecord::Schema[8.1].define(version: 2026_07_20_124731) do
|
||||
t.text "private_key"
|
||||
t.integer "protocol", default: 0, null: false
|
||||
t.text "public_key", default: "", null: false
|
||||
t.datetime "requested_deletion_at"
|
||||
t.datetime "requested_review_at", precision: nil
|
||||
t.datetime "reviewed_at", precision: nil
|
||||
t.datetime "sensitized_at", precision: nil
|
||||
@@ -1635,10 +1636,9 @@ ActiveRecord::Schema[8.1].define(version: 2026_07_20_124731) do
|
||||
WHERE ((statuses.account_id = accounts.id) AND (statuses.deleted_at IS NULL) AND (statuses.reblog_of_id IS NULL))
|
||||
ORDER BY statuses.id DESC
|
||||
LIMIT 20) t0)
|
||||
WHERE ((accounts.suspended_at IS NULL) AND (accounts.silenced_at IS NULL) AND (accounts.moved_to_account_id IS NULL) AND (accounts.discoverable = true) AND (accounts.locked = false))
|
||||
WHERE ((accounts.suspended_at IS NULL) AND (accounts.requested_deletion_at IS NULL) AND (accounts.silenced_at IS NULL) AND (accounts.moved_to_account_id IS NULL) AND (accounts.discoverable = true) AND (accounts.locked = false))
|
||||
GROUP BY accounts.id;
|
||||
SQL
|
||||
add_index "account_summaries", ["account_id", "language", "sensitive"], name: "idx_on_account_id_language_sensitive_250461e1eb"
|
||||
add_index "account_summaries", ["account_id"], name: "index_account_summaries_on_account_id", unique: true
|
||||
|
||||
create_view "global_follow_recommendations", materialized: true, sql_definition: <<-SQL
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
SELECT
|
||||
accounts.id AS account_id,
|
||||
mode() WITHIN GROUP (ORDER BY language ASC) AS language,
|
||||
mode() WITHIN GROUP (ORDER BY sensitive ASC) AS sensitive
|
||||
FROM accounts
|
||||
CROSS JOIN LATERAL (
|
||||
SELECT
|
||||
statuses.account_id,
|
||||
statuses.language,
|
||||
statuses.sensitive
|
||||
FROM statuses
|
||||
WHERE statuses.account_id = accounts.id
|
||||
AND statuses.deleted_at IS NULL
|
||||
AND statuses.reblog_of_id IS NULL
|
||||
ORDER BY statuses.id DESC
|
||||
LIMIT 20
|
||||
) t0
|
||||
WHERE accounts.suspended_at IS NULL
|
||||
AND accounts.requested_deletion_at IS NULL
|
||||
AND accounts.silenced_at IS NULL
|
||||
AND accounts.moved_to_account_id IS NULL
|
||||
AND accounts.discoverable = 't'
|
||||
AND accounts.locked = 'f'
|
||||
GROUP BY accounts.id
|
||||
+3
-3
@@ -66,9 +66,9 @@ namespace :db do
|
||||
abort 'This version of Mastodon requires PostgreSQL 14.0 or newer. Please update PostgreSQL before updating Mastodon.' if pg_version < 140_000
|
||||
|
||||
schema_version = ActiveRecord::Migrator.current_version
|
||||
abort <<~MESSAGE if ENV['SKIP_POST_DEPLOYMENT_MIGRATIONS'] && schema_version < 2023_09_07_150100
|
||||
Zero-downtime migrations from Mastodon versions earlier than 4.2.0 are not supported.
|
||||
Please update to Mastodon 4.2.x first or upgrade by stopping all services and running migrations without `SKIP_POST_DEPLOYMENT_MIGRATIONS`.
|
||||
abort <<~MESSAGE if ENV['SKIP_POST_DEPLOYMENT_MIGRATIONS'] && schema_version < 2024_10_07_071624
|
||||
Zero-downtime migrations from Mastodon versions earlier than 4.3.0 are not supported.
|
||||
Please update to Mastodon 4.3.x first or upgrade by stopping all services and running migrations without `SKIP_POST_DEPLOYMENT_MIGRATIONS`.
|
||||
MESSAGE
|
||||
end
|
||||
|
||||
|
||||
+34
-12
@@ -117,6 +117,21 @@ namespace :tests do
|
||||
exit(1)
|
||||
end
|
||||
|
||||
unless Account.find_by(username: 'suspended', domain: nil).suspended?
|
||||
puts 'Unexpected value for Account#suspended? for user @suspended'
|
||||
exit(1)
|
||||
end
|
||||
|
||||
if Account.find_by(username: 'deleted', domain: nil).suspended?
|
||||
puts 'Unexpected value for Account#suspended? for user @deleted'
|
||||
exit(1)
|
||||
end
|
||||
|
||||
unless Account.find_by(username: 'deleted', domain: nil).deleted?
|
||||
puts 'Unexpected value for Account#deleted? for user @deleted'
|
||||
exit(1)
|
||||
end
|
||||
|
||||
unless Identity.where(provider: 'foo', uid: 0).one?
|
||||
puts 'Identities not deduplicated as expected'
|
||||
exit(1)
|
||||
@@ -227,11 +242,11 @@ namespace :tests do
|
||||
INSERT INTO "accounts"
|
||||
(id, username, domain, uri, private_key, public_key, created_at, updated_at, last_webfingered_at)
|
||||
VALUES
|
||||
(12, 'alice', 'social.example.com', 'https://social.example.com/alice', NULL, #{user_public_key}, '2021-01-01'::date, now(), '2021-01-09'::date),
|
||||
(13, 'alice', 'example.com', 'https://social.example.com/alice', NULL, #{user_public_key}, '2021-01-10'::date, now(), '2021-01-11'::date),
|
||||
(14, 'bogus1', 'example.com', '', NULL, '', now(), now(), now()),
|
||||
(15, 'bogus2', 'example.com', '', NULL, '', now(), now(), now()),
|
||||
(16, 'bogus3', 'example.com', '', NULL, '', now(), now(), now());
|
||||
(14, 'alice', 'social.example.com', 'https://social.example.com/alice', NULL, #{user_public_key}, '2021-01-01'::date, now(), '2021-01-09'::date),
|
||||
(15, 'alice', 'example.com', 'https://social.example.com/alice', NULL, #{user_public_key}, '2021-01-10'::date, now(), '2021-01-11'::date),
|
||||
(16, 'bogus1', 'example.com', '', NULL, '', now(), now(), now()),
|
||||
(17, 'bogus2', 'example.com', '', NULL, '', now(), now(), now()),
|
||||
(18, 'bogus3', 'example.com', '', NULL, '', now(), now(), now());
|
||||
SQL
|
||||
end
|
||||
|
||||
@@ -292,20 +307,20 @@ namespace :tests do
|
||||
INSERT INTO "accounts"
|
||||
(id, username, domain, private_key, public_key, created_at, updated_at)
|
||||
VALUES
|
||||
(10, 'kmruser', NULL, #{user_private_key}, #{user_public_key}, now(), now()),
|
||||
(11, 'qcuser', NULL, #{user_private_key}, #{user_public_key}, now(), now());
|
||||
(12, 'kmruser', NULL, #{user_private_key}, #{user_public_key}, now(), now()),
|
||||
(13, 'qcuser', NULL, #{user_private_key}, #{user_public_key}, now(), now());
|
||||
|
||||
INSERT INTO "users"
|
||||
(id, account_id, email, created_at, updated_at, admin, locale, chosen_languages)
|
||||
VALUES
|
||||
(4, 10, 'kmruser@localhost', now(), now(), false, 'ku', '{en,kmr,ku,ckb}');
|
||||
(5, 12, 'kmruser@localhost', now(), now(), false, 'ku', '{en,kmr,ku,ckb}');
|
||||
|
||||
INSERT INTO "users"
|
||||
(id, account_id, email, created_at, updated_at, locale,
|
||||
encrypted_otp_secret, encrypted_otp_secret_iv, encrypted_otp_secret_salt,
|
||||
otp_required_for_login)
|
||||
VALUES
|
||||
(5, 11, 'qcuser@localhost', now(), now(), 'fr-QC',
|
||||
(6, 13, 'qcuser@localhost', now(), now(), 'fr-QC',
|
||||
E'Fttsy7QAa0edaDfdfSz094rRLAxc8cJweDQ4BsWH/zozcdVA8o9GLqcKhn2b\nGi/V\n',
|
||||
'rys3THICkr60BoWC',
|
||||
'_LMkAGvdg7a+sDIKjI3mR2Q==',
|
||||
@@ -314,7 +329,7 @@ namespace :tests do
|
||||
INSERT INTO "settings"
|
||||
(id, thing_type, thing_id, var, value, created_at, updated_at)
|
||||
VALUES
|
||||
(5, 'User', 4, 'default_language', E'--- kmr\n', now(), now()),
|
||||
(5, 'User', 5, 'default_language', E'--- kmr\n', now(), now()),
|
||||
(6, 'User', 1, 'interactions', E'--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nmust_be_follower: false\nmust_be_following: true\nmust_be_following_dm: false\n', now(), now());
|
||||
|
||||
INSERT INTO "identities"
|
||||
@@ -391,18 +406,25 @@ namespace :tests do
|
||||
'https://activitypub.com/users/evil/inbox', 'https://activitypub.com/users/evil/outbox',
|
||||
'https://activitypub.com/users/evil/followers', true);
|
||||
|
||||
INSERT INTO "accounts"
|
||||
(id, username, domain, private_key, public_key, created_at, updated_at, suspended)
|
||||
VALUES
|
||||
(10, 'suspended', NULL, #{admin_private_key}, #{admin_public_key}, now(), now(), true),
|
||||
(11, 'deleted', NULL, #{user_private_key}, #{user_public_key}, now(), now(), true);
|
||||
|
||||
-- users
|
||||
|
||||
INSERT INTO "users"
|
||||
(id, account_id, email, created_at, updated_at, admin)
|
||||
VALUES
|
||||
(1, 1, 'admin@localhost', now(), now(), true),
|
||||
(2, 2, 'user@localhost', now(), now(), false);
|
||||
(2, 2, 'user@localhost', now(), now(), false),
|
||||
(3, 10, 'suspended@localhost', now(), now(), false);
|
||||
|
||||
INSERT INTO "users"
|
||||
(id, account_id, email, created_at, updated_at, admin, locale)
|
||||
VALUES
|
||||
(3, 8, 'ptuser@localhost', now(), now(), false, 'pt');
|
||||
(4, 8, 'ptuser@localhost', now(), now(), false, 'pt');
|
||||
|
||||
-- conversations
|
||||
INSERT INTO "conversations" (id, created_at, updated_at) VALUES (1, now(), now());
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@mastodon/mastodon",
|
||||
"license": "AGPL-3.0-or-later",
|
||||
"packageManager": "yarn@4.17.1",
|
||||
"packageManager": "yarn@4.18.0",
|
||||
"engines": {
|
||||
"node": ">=22"
|
||||
},
|
||||
|
||||
@@ -93,7 +93,7 @@ RSpec.describe ApplicationController do
|
||||
end
|
||||
end
|
||||
|
||||
describe 'before_action :check_suspension' do
|
||||
describe 'before_action :require_functional!' do
|
||||
before do
|
||||
routes.draw { get 'success' => 'anonymous#success' }
|
||||
end
|
||||
@@ -103,17 +103,29 @@ RSpec.describe ApplicationController do
|
||||
expect(response).to have_http_status(200)
|
||||
end
|
||||
|
||||
it 'does nothing if user who signed in is not suspended' do
|
||||
it 'does nothing if user who signed in is functional' do
|
||||
sign_in(Fabricate(:account, suspended: false).user)
|
||||
get 'success'
|
||||
expect(response).to have_http_status(200)
|
||||
end
|
||||
|
||||
it 'redirects to account status page' do
|
||||
it 'redirects to account status page if the account is suspended' do
|
||||
sign_in(Fabricate(:account, suspended: true).user)
|
||||
get 'success'
|
||||
expect(response).to redirect_to(edit_user_registration_path)
|
||||
end
|
||||
|
||||
it 'redirects to account status page if the account is pending deletion' do
|
||||
sign_in(Fabricate(:account, requested_deletion: true).user)
|
||||
get 'success'
|
||||
expect(response).to redirect_to(edit_user_registration_path)
|
||||
end
|
||||
|
||||
it 'redirects to auth setup page if the account is unconfirmed' do
|
||||
sign_in(Fabricate(:user, confirmed_at: nil))
|
||||
get 'success'
|
||||
expect(response).to redirect_to(auth_setup_path)
|
||||
end
|
||||
end
|
||||
|
||||
describe 'raise_not_found' do
|
||||
|
||||
@@ -141,6 +141,15 @@ RSpec.describe Auth::RegistrationsController do
|
||||
expect(response).to have_http_status(403)
|
||||
end
|
||||
end
|
||||
|
||||
context 'when deleted' do
|
||||
let(:user) { Fabricate(:user, account_attributes: { username: 'test', requested_deletion_at: Time.now.utc }) }
|
||||
|
||||
it 'returns http forbidden' do
|
||||
put :update
|
||||
expect(response).to have_http_status(403)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe 'GET #new' do
|
||||
|
||||
@@ -48,6 +48,19 @@ RSpec.describe Auth::SessionsController do
|
||||
expect(response).to redirect_to(new_user_session_path)
|
||||
end
|
||||
end
|
||||
|
||||
context 'with a deleted user' do
|
||||
before do
|
||||
user.account.mark_deleted!
|
||||
end
|
||||
|
||||
it 'redirects to home after sign out' do
|
||||
sign_in(user, scope: :user)
|
||||
delete :destroy
|
||||
|
||||
expect(response).to redirect_to(new_user_session_path)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe 'POST #create' do
|
||||
|
||||
@@ -33,7 +33,7 @@ RSpec.describe AccountControllerConcern do
|
||||
end
|
||||
end
|
||||
|
||||
context 'when account is suspended' do
|
||||
context 'when account is permanently suspended' do
|
||||
it 'returns http gone' do
|
||||
account = Fabricate(:account, suspended: true)
|
||||
get 'success', params: { account_username: account.username }
|
||||
@@ -41,14 +41,32 @@ RSpec.describe AccountControllerConcern do
|
||||
end
|
||||
end
|
||||
|
||||
context 'when account is deleted by owner' do
|
||||
context 'when account is temporarily suspended' do
|
||||
it 'returns http forbidden' do
|
||||
account = Fabricate(:account)
|
||||
account.suspend!
|
||||
get 'success', params: { account_username: account.username }
|
||||
expect(response).to have_http_status(403)
|
||||
end
|
||||
end
|
||||
|
||||
context 'when account is permanently deleted' do
|
||||
it 'returns http gone' do
|
||||
account = Fabricate(:account, suspended: true, user: nil)
|
||||
account = Fabricate(:account, requested_deletion: true)
|
||||
get 'success', params: { account_username: account.username }
|
||||
expect(response).to have_http_status(410)
|
||||
end
|
||||
end
|
||||
|
||||
context 'when account is pending deletion' do
|
||||
it 'returns http forbidden' do
|
||||
account = Fabricate(:account)
|
||||
account.mark_deleted!
|
||||
get 'success', params: { account_username: account.username }
|
||||
expect(response).to have_http_status(403)
|
||||
end
|
||||
end
|
||||
|
||||
context 'when account is not suspended' do
|
||||
let(:account) { Fabricate(:account, username: 'username') }
|
||||
|
||||
|
||||
@@ -36,6 +36,27 @@ RSpec.describe FollowingAccountsController do
|
||||
expect(response).to have_http_status(403)
|
||||
end
|
||||
end
|
||||
|
||||
context 'when account is permanently deleted' do
|
||||
before do
|
||||
alice.mark_deleted!
|
||||
alice.deletion_request.destroy
|
||||
end
|
||||
|
||||
it 'returns http gone' do
|
||||
expect(response).to have_http_status(410)
|
||||
end
|
||||
end
|
||||
|
||||
context 'when account is pending deletion' do
|
||||
before do
|
||||
alice.mark_deleted!
|
||||
end
|
||||
|
||||
it 'returns http forbidden' do
|
||||
expect(response).to have_http_status(403)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context 'when format is json' do
|
||||
@@ -108,6 +129,27 @@ RSpec.describe FollowingAccountsController do
|
||||
expect(response).to have_http_status(403)
|
||||
end
|
||||
end
|
||||
|
||||
context 'when account is permanently deleted' do
|
||||
before do
|
||||
alice.mark_deleted!
|
||||
alice.deletion_request.destroy
|
||||
end
|
||||
|
||||
it 'returns http gone' do
|
||||
expect(response).to have_http_status(410)
|
||||
end
|
||||
end
|
||||
|
||||
context 'when account is pending deletion' do
|
||||
before do
|
||||
alice.mark_deleted!
|
||||
end
|
||||
|
||||
it 'returns http forbidden' do
|
||||
expect(response).to have_http_status(403)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context 'without page' do
|
||||
@@ -161,6 +203,27 @@ RSpec.describe FollowingAccountsController do
|
||||
expect(response).to have_http_status(403)
|
||||
end
|
||||
end
|
||||
|
||||
context 'when account is permanently deleted' do
|
||||
before do
|
||||
alice.mark_deleted!
|
||||
alice.deletion_request.destroy
|
||||
end
|
||||
|
||||
it 'returns http gone' do
|
||||
expect(response).to have_http_status(410)
|
||||
end
|
||||
end
|
||||
|
||||
context 'when account is pending deletion' do
|
||||
before do
|
||||
alice.mark_deleted!
|
||||
end
|
||||
|
||||
it 'returns http forbidden' do
|
||||
expect(response).to have_http_status(403)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -3,17 +3,18 @@
|
||||
require_relative '../support/signing_keys_helpers'
|
||||
|
||||
Fabricator(:account) do
|
||||
transient :suspended, :silenced, :legacy_keypair
|
||||
username { sequence(:username) { |i| "#{Faker::Internet.user_name(separators: %w(_))}#{i}" } }
|
||||
last_webfingered_at { Time.now.utc }
|
||||
public_key { |attrs| attrs[:legacy_keypair] ? SigningKeysHelpers::PUBLIC_RSA_TEST_KEY : '' }
|
||||
private_key { |attrs| attrs[:legacy_keypair] && attrs[:domain].nil? ? SigningKeysHelpers::PRIVATE_RSA_TEST_KEY : nil }
|
||||
suspended_at { |attrs| attrs[:suspended] ? Time.now.utc : nil }
|
||||
silenced_at { |attrs| attrs[:silenced] ? Time.now.utc : nil }
|
||||
user { |attrs| attrs[:domain].nil? ? Fabricate.build(:user, account: nil) : nil }
|
||||
uri { |attrs| attrs[:domain].nil? ? nil : "https://#{attrs[:domain]}/users/#{attrs[:username]}" }
|
||||
discoverable true
|
||||
indexable true
|
||||
transient :suspended, :silenced, :legacy_keypair, :requested_deletion
|
||||
username { sequence(:username) { |i| "#{Faker::Internet.user_name(separators: %w(_))}#{i}" } }
|
||||
last_webfingered_at { Time.now.utc }
|
||||
public_key { |attrs| attrs[:legacy_keypair] ? SigningKeysHelpers::PUBLIC_RSA_TEST_KEY : '' }
|
||||
private_key { |attrs| attrs[:legacy_keypair] && attrs[:domain].nil? ? SigningKeysHelpers::PRIVATE_RSA_TEST_KEY : nil }
|
||||
suspended_at { |attrs| attrs[:suspended] ? Time.now.utc : nil }
|
||||
silenced_at { |attrs| attrs[:silenced] ? Time.now.utc : nil }
|
||||
requested_deletion_at { |attrs| attrs[:requested_deletion] ? Time.now.utc : nil }
|
||||
user { |attrs| attrs[:domain].nil? ? Fabricate.build(:user, account: nil) : nil }
|
||||
uri { |attrs| attrs[:domain].nil? ? nil : "https://#{attrs[:domain]}/users/#{attrs[:username]}" }
|
||||
discoverable true
|
||||
indexable true
|
||||
|
||||
# This is not strictly needed but this avoids generating multiple keys
|
||||
# and, when `store_private_key` is passed, stores private keys for use in request specs
|
||||
|
||||
@@ -74,16 +74,19 @@ RSpec.describe User do
|
||||
end
|
||||
end
|
||||
|
||||
describe 'account_not_suspended' do
|
||||
describe 'account_available' do
|
||||
it 'returns with linked accounts that are not suspended' do
|
||||
suspended_account = Fabricate(:account, suspended_at: 10.days.ago)
|
||||
non_suspended_account = Fabricate(:account, suspended_at: nil)
|
||||
suspended_user = Fabricate(:user, account: suspended_account)
|
||||
non_suspended_user = Fabricate(:user, account: non_suspended_account)
|
||||
deleted_account = Fabricate(:account, requested_deletion_at: 10.days.ago)
|
||||
deleted_user = Fabricate(:user, account: deleted_account)
|
||||
|
||||
expect(described_class.account_not_suspended)
|
||||
expect(described_class.account_available)
|
||||
.to include(non_suspended_user)
|
||||
.and not_include(suspended_user)
|
||||
.and not_include(deleted_user)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -62,6 +62,33 @@ RSpec.describe 'Accounts show response' do
|
||||
end
|
||||
end
|
||||
|
||||
describe 'permanently deleted account check' do
|
||||
before do
|
||||
account.mark_deleted!
|
||||
account.deletion_request.destroy
|
||||
end
|
||||
|
||||
it 'returns appropriate http response code' do
|
||||
{ html: 410, json: 410, rss: 410 }.each do |format, code|
|
||||
get short_account_path(username: account.username), as: format
|
||||
|
||||
expect(response).to have_http_status(code)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe 'pending deletion account check' do
|
||||
before { account.mark_deleted! }
|
||||
|
||||
it 'returns appropriate http response code' do
|
||||
{ html: 403, json: 403, rss: 403 }.each do |format, code|
|
||||
get short_account_path(username: account.username), as: format
|
||||
|
||||
expect(response).to have_http_status(code)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe 'GET to short username paths' do
|
||||
context 'with existing statuses' do
|
||||
context 'with HTML' do
|
||||
|
||||
@@ -62,6 +62,33 @@ RSpec.describe 'ActivityPub Collections' do
|
||||
.to have_http_status(403)
|
||||
end
|
||||
end
|
||||
|
||||
context 'when account is permanently deleted' do
|
||||
before do
|
||||
account.mark_deleted!
|
||||
account.deletion_request.destroy
|
||||
end
|
||||
|
||||
it 'returns http gone' do
|
||||
subject
|
||||
|
||||
expect(response)
|
||||
.to have_http_status(410)
|
||||
end
|
||||
end
|
||||
|
||||
context 'when account is pending deletion' do
|
||||
before do
|
||||
account.mark_deleted!
|
||||
end
|
||||
|
||||
it 'returns http forbidden' do
|
||||
subject
|
||||
|
||||
expect(response)
|
||||
.to have_http_status(403)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context 'with signature' do
|
||||
|
||||
@@ -62,6 +62,33 @@ RSpec.describe 'ActivityPub Inboxes' do
|
||||
.to have_http_status(202)
|
||||
end
|
||||
end
|
||||
|
||||
context 'when account is permanently deleted' do
|
||||
before do
|
||||
account.mark_deleted!
|
||||
account.deletion_request.destroy
|
||||
end
|
||||
|
||||
it 'returns http gone' do
|
||||
subject
|
||||
|
||||
expect(response)
|
||||
.to have_http_status(410)
|
||||
end
|
||||
end
|
||||
|
||||
context 'when account is pending deletion' do
|
||||
before do
|
||||
account.mark_deleted!
|
||||
end
|
||||
|
||||
it 'returns http accepted' do
|
||||
subject
|
||||
|
||||
expect(response)
|
||||
.to have_http_status(202)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -61,6 +61,33 @@ RSpec.describe 'ActivityPub Outboxes' do
|
||||
.to have_http_status(403)
|
||||
end
|
||||
end
|
||||
|
||||
context 'when account is permanently deleted' do
|
||||
before do
|
||||
account.mark_deleted!
|
||||
account.deletion_request.destroy
|
||||
end
|
||||
|
||||
it 'returns http gone' do
|
||||
subject
|
||||
|
||||
expect(response)
|
||||
.to have_http_status(410)
|
||||
end
|
||||
end
|
||||
|
||||
context 'when account is pending deletion' do
|
||||
before do
|
||||
account.mark_deleted!
|
||||
end
|
||||
|
||||
it 'returns http forbidden' do
|
||||
subject
|
||||
|
||||
expect(response)
|
||||
.to have_http_status(403)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context 'with page requested' do
|
||||
@@ -110,6 +137,33 @@ RSpec.describe 'ActivityPub Outboxes' do
|
||||
.to have_http_status(403)
|
||||
end
|
||||
end
|
||||
|
||||
context 'when account is permanently deleted' do
|
||||
before do
|
||||
account.mark_deleted!
|
||||
account.deletion_request.destroy
|
||||
end
|
||||
|
||||
it 'returns http gone' do
|
||||
subject
|
||||
|
||||
expect(response)
|
||||
.to have_http_status(410)
|
||||
end
|
||||
end
|
||||
|
||||
context 'when account is pending deletion' do
|
||||
before do
|
||||
account.mark_deleted!
|
||||
end
|
||||
|
||||
it 'returns http forbidden' do
|
||||
subject
|
||||
|
||||
expect(response)
|
||||
.to have_http_status(403)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -77,6 +77,37 @@ RSpec.describe 'ActivityPub Replies' do
|
||||
end
|
||||
end
|
||||
|
||||
context 'when account is permanently deleted' do
|
||||
let(:parent_visibility) { :public }
|
||||
|
||||
before do
|
||||
status.account.mark_deleted!
|
||||
status.account.deletion_request.destroy
|
||||
end
|
||||
|
||||
it 'returns http gone' do
|
||||
subject
|
||||
|
||||
expect(response)
|
||||
.to have_http_status(410)
|
||||
end
|
||||
end
|
||||
|
||||
context 'when account is pending deletion' do
|
||||
let(:parent_visibility) { :public }
|
||||
|
||||
before do
|
||||
status.account.mark_deleted!
|
||||
end
|
||||
|
||||
it 'returns http forbidden' do
|
||||
subject
|
||||
|
||||
expect(response)
|
||||
.to have_http_status(403)
|
||||
end
|
||||
end
|
||||
|
||||
context 'when status is public' do
|
||||
let(:parent_visibility) { :public }
|
||||
|
||||
|
||||
@@ -66,5 +66,30 @@ RSpec.describe 'API V1 Accounts FollowerAccounts' do
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
context 'when request account is permanently deleted' do
|
||||
before do
|
||||
account.mark_deleted!
|
||||
account.deletion_request.destroy
|
||||
end
|
||||
|
||||
it 'returns http not found' do
|
||||
get "/api/v1/accounts/#{account.id}/followers", params: { limit: 2 }, headers: headers
|
||||
|
||||
expect(response).to have_http_status(404)
|
||||
end
|
||||
end
|
||||
|
||||
context 'when request account is pending deletion' do
|
||||
before do
|
||||
account.mark_deleted!
|
||||
end
|
||||
|
||||
it 'returns http not found' do
|
||||
get "/api/v1/accounts/#{account.id}/followers", params: { limit: 2 }, headers: headers
|
||||
|
||||
expect(response).to have_http_status(404)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -66,5 +66,30 @@ RSpec.describe 'API V1 Accounts FollowingAccounts' do
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
context 'when request account is permanently deleted' do
|
||||
before do
|
||||
account.mark_deleted!
|
||||
account.deletion_request.destroy
|
||||
end
|
||||
|
||||
it 'returns http not found' do
|
||||
get "/api/v1/accounts/#{account.id}/following", params: { limit: 2 }, headers: headers
|
||||
|
||||
expect(response).to have_http_status(404)
|
||||
end
|
||||
end
|
||||
|
||||
context 'when request account is pending deletion' do
|
||||
before do
|
||||
account.mark_deleted!
|
||||
end
|
||||
|
||||
it 'returns http not found' do
|
||||
get "/api/v1/accounts/#{account.id}/following", params: { limit: 2 }, headers: headers
|
||||
|
||||
expect(response).to have_http_status(404)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -22,4 +22,29 @@ RSpec.describe 'Accounts Lists API' do
|
||||
.to start_with('application/json')
|
||||
end
|
||||
end
|
||||
|
||||
context 'when requested account is permanently deleted' do
|
||||
before do
|
||||
account.mark_deleted!
|
||||
account.deletion_request.destroy
|
||||
end
|
||||
|
||||
it 'returns http not found' do
|
||||
get "/api/v1/accounts/#{account.id}/lists", headers: headers
|
||||
|
||||
expect(response).to have_http_status(404)
|
||||
end
|
||||
end
|
||||
|
||||
context 'when requested account is pending deletion' do
|
||||
before do
|
||||
account.mark_deleted!
|
||||
end
|
||||
|
||||
it 'returns http not found' do
|
||||
get "/api/v1/accounts/#{account.id}/lists", headers: headers
|
||||
|
||||
expect(response).to have_http_status(404)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -152,5 +152,34 @@ RSpec.describe 'API V1 Accounts Statuses' do
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context 'when requested account is permanently deleted' do
|
||||
let(:account) { Fabricate(:account) }
|
||||
|
||||
before do
|
||||
account.mark_deleted!
|
||||
account.deletion_request.destroy
|
||||
end
|
||||
|
||||
it 'returns http not found' do
|
||||
get "/api/v1/accounts/#{account.id}/statuses", params: { limit: 2 }, headers: headers
|
||||
|
||||
expect(response).to have_http_status(404)
|
||||
end
|
||||
end
|
||||
|
||||
context 'when requested account is pending deletion' do
|
||||
let(:account) { Fabricate(:account) }
|
||||
|
||||
before do
|
||||
account.mark_deleted!
|
||||
end
|
||||
|
||||
it 'returns http not found' do
|
||||
get "/api/v1/accounts/#{account.id}/statuses", params: { limit: 2 }, headers: headers
|
||||
|
||||
expect(response).to have_http_status(404)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -48,6 +48,31 @@ RSpec.describe '/api/v1/accounts' do
|
||||
end
|
||||
end
|
||||
|
||||
context 'when requesting a permanently deleted account' do
|
||||
let(:other_account) { Fabricate(:account, requested_deletion: true) }
|
||||
|
||||
before do
|
||||
get "/api/v1/accounts/#{other_account.id}"
|
||||
end
|
||||
|
||||
it 'returns http not found' do
|
||||
expect(response).to have_http_status(404)
|
||||
end
|
||||
end
|
||||
|
||||
context 'when requesting an account pending deletion' do
|
||||
let(:other_account) { Fabricate(:account) }
|
||||
|
||||
before do
|
||||
other_account.mark_deleted!
|
||||
get "/api/v1/accounts/#{other_account.id}"
|
||||
end
|
||||
|
||||
it 'returns http not found' do
|
||||
expect(response).to have_http_status(404)
|
||||
end
|
||||
end
|
||||
|
||||
context 'when logged in' do
|
||||
subject do
|
||||
get "/api/v1/accounts/#{account.id}", headers: headers
|
||||
|
||||
@@ -26,6 +26,17 @@ RSpec.describe 'Settings Deletes' do
|
||||
.to have_http_status(403)
|
||||
end
|
||||
end
|
||||
|
||||
context 'when already deleted' do
|
||||
let(:user) { Fabricate(:user, account_attributes: { requested_deletion_at: Time.now.utc }) }
|
||||
|
||||
it 'returns http forbidden' do
|
||||
delete settings_delete_path
|
||||
|
||||
expect(response)
|
||||
.to have_http_status(403)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context 'when not signed in' do
|
||||
@@ -54,6 +65,17 @@ RSpec.describe 'Settings Deletes' do
|
||||
.to include('private, no-store')
|
||||
end
|
||||
end
|
||||
|
||||
context 'when already deleted' do
|
||||
let(:user) { Fabricate(:user, account_attributes: { requested_deletion_at: Time.now.utc }) }
|
||||
|
||||
it 'returns http forbidden' do
|
||||
get settings_delete_path
|
||||
|
||||
expect(response)
|
||||
.to have_http_status(403)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context 'when not signed in' do
|
||||
|
||||
@@ -33,6 +33,33 @@ RSpec.describe 'Statuses' do
|
||||
end
|
||||
end
|
||||
|
||||
context 'when account is permanently deleted' do
|
||||
before do
|
||||
account.mark_deleted!
|
||||
account.deletion_request.destroy
|
||||
end
|
||||
|
||||
it 'returns http gone' do
|
||||
get "/@#{account.username}/#{status.id}"
|
||||
|
||||
expect(response)
|
||||
.to have_http_status(410)
|
||||
end
|
||||
end
|
||||
|
||||
context 'when account is temporarily deleted' do
|
||||
before do
|
||||
account.mark_deleted!
|
||||
end
|
||||
|
||||
it 'returns http forbidden' do
|
||||
get "/@#{account.username}/#{status.id}"
|
||||
|
||||
expect(response)
|
||||
.to have_http_status(403)
|
||||
end
|
||||
end
|
||||
|
||||
context 'when status is a reblog' do
|
||||
let(:original_account) { Fabricate(:account, domain: 'example.com') }
|
||||
let(:original_status) { Fabricate(:status, account: original_account, url: 'https://example.com/123') }
|
||||
|
||||
@@ -53,7 +53,18 @@ RSpec.describe 'The /.well-known/webfinger endpoint' do
|
||||
it_behaves_like 'a successful response'
|
||||
end
|
||||
|
||||
context 'when an account is permanently suspended or deleted' do
|
||||
context 'when an account is pending deletion' do
|
||||
let(:resource) { alice.to_webfinger_s }
|
||||
|
||||
before do
|
||||
alice.mark_deleted!
|
||||
perform_request!
|
||||
end
|
||||
|
||||
it_behaves_like 'a successful response'
|
||||
end
|
||||
|
||||
context 'when an account is permanently suspended' do
|
||||
let(:resource) { alice.to_webfinger_s }
|
||||
|
||||
before do
|
||||
@@ -67,6 +78,20 @@ RSpec.describe 'The /.well-known/webfinger endpoint' do
|
||||
end
|
||||
end
|
||||
|
||||
context 'when an account is permanently deleted' do
|
||||
let(:resource) { alice.to_webfinger_s }
|
||||
|
||||
before do
|
||||
alice.mark_deleted!
|
||||
alice.deletion_request.destroy
|
||||
perform_request!
|
||||
end
|
||||
|
||||
it 'returns http gone' do
|
||||
expect(response).to have_http_status(410)
|
||||
end
|
||||
end
|
||||
|
||||
context 'when an account is not found' do
|
||||
let(:resource) { 'acct:not@existing.com' }
|
||||
|
||||
|
||||
@@ -78,6 +78,15 @@ RSpec.describe AccountSearchService do
|
||||
expect(results).to eq [partial]
|
||||
end
|
||||
|
||||
it 'returns the fuzzy match first, and does not return deleted exacts' do
|
||||
partial = Fabricate(:account, username: 'exactness')
|
||||
Fabricate(:account, username: 'exact', requested_deletion: true)
|
||||
results = subject.call('exact', nil, limit: 10)
|
||||
|
||||
expect(results.size).to eq 1
|
||||
expect(results).to eq [partial]
|
||||
end
|
||||
|
||||
it 'does not return suspended remote accounts' do
|
||||
Fabricate(:account, username: 'a', domain: 'remote', display_name: 'e', suspended: true)
|
||||
results = subject.call('a@example.com', nil, limit: 2)
|
||||
@@ -85,6 +94,14 @@ RSpec.describe AccountSearchService do
|
||||
expect(results.size).to eq 0
|
||||
expect(results).to eq []
|
||||
end
|
||||
|
||||
it 'does not return deleted remote accounts' do
|
||||
Fabricate(:account, username: 'a', domain: 'remote', display_name: 'e', requested_deletion: true)
|
||||
results = subject.call('a@example.com', nil, limit: 2)
|
||||
|
||||
expect(results.size).to eq 0
|
||||
expect(results).to eq []
|
||||
end
|
||||
end
|
||||
|
||||
context 'when elasticsearch is enabled', :search do
|
||||
|
||||
@@ -50,6 +50,11 @@ RSpec.describe NotifyService do
|
||||
expect { subject }.to_not change(Notification, :count)
|
||||
end
|
||||
|
||||
it 'does not notify when recipient is deleted' do
|
||||
recipient.mark_deleted!
|
||||
expect { subject }.to_not change(Notification, :count)
|
||||
end
|
||||
|
||||
describe 'reblogs' do
|
||||
let(:status) { Fabricate(:status, account: Fabricate(:account)) }
|
||||
let(:activity) { Fabricate(:status, account: sender, reblog: status) }
|
||||
|
||||
@@ -27,10 +27,8 @@ RSpec.describe 'Settings Deletes' do
|
||||
.to have_text(I18n.t('deletes.success_msg'))
|
||||
expect(page)
|
||||
.to have_title(I18n.t('auth.login'))
|
||||
expect(User.find_by(id: user.id))
|
||||
.to be_nil
|
||||
expect(user.account.reload)
|
||||
.to be_suspended
|
||||
.to be_deleted
|
||||
expect(CanonicalEmailBlock.block?(user.email))
|
||||
.to be(false)
|
||||
end
|
||||
|
||||
@@ -41,14 +41,14 @@ RSpec.describe Scheduler::SelfDestructScheduler do
|
||||
context 'when sidekiq is operational' do
|
||||
let!(:other_account) { Fabricate :account, inbox_url: 'https://host.example/inbox', domain: 'host.example', protocol: :activitypub }
|
||||
|
||||
it 'suspends local non-suspended accounts' do
|
||||
it 'deletes local non-deleted accounts' do
|
||||
worker.perform
|
||||
|
||||
expect(account.reload.suspended_at).to_not be_nil
|
||||
expect(account.reload.requested_deletion_at).to_not be_nil
|
||||
end
|
||||
|
||||
it 'suspends local suspended accounts marked for deletion' do
|
||||
account.update(suspended_at: 10.days.ago)
|
||||
it 'deletes local accounts marked for deletion' do
|
||||
account.update(requested_deletion_at: 10.days.ago)
|
||||
deletion_request = Fabricate(:account_deletion_request, account: account)
|
||||
|
||||
worker.perform
|
||||
@@ -56,7 +56,7 @@ RSpec.describe Scheduler::SelfDestructScheduler do
|
||||
expect(ActivityPub::DeliveryWorker)
|
||||
.to have_enqueued_sidekiq_job(match_json_values(type: 'Delete', signature: be_present), account.id, other_account.inbox_url)
|
||||
|
||||
expect(account.reload.suspended_at).to be > 1.day.ago
|
||||
expect(account.reload.requested_deletion_at).to be > 1.day.ago
|
||||
expect { deletion_request.reload }.to raise_error(ActiveRecord::RecordNotFound)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@mastodon/streaming",
|
||||
"license": "AGPL-3.0-or-later",
|
||||
"packageManager": "yarn@4.17.1",
|
||||
"packageManager": "yarn@4.18.0",
|
||||
"engines": {
|
||||
"node": ">=22"
|
||||
},
|
||||
@@ -21,7 +21,7 @@
|
||||
"dotenv": "^17.0.0",
|
||||
"express": "^5.1.0",
|
||||
"ioredis": "^5.3.2",
|
||||
"jsdom": "^29.0.0",
|
||||
"jsdom": "^30.0.0",
|
||||
"pg": "^8.5.0",
|
||||
"pg-connection-string": "^2.6.0",
|
||||
"pino": "^10.0.0",
|
||||
|
||||
@@ -26,43 +26,28 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@asamuzakjp/css-color@npm:^5.1.11":
|
||||
version: 5.1.11
|
||||
resolution: "@asamuzakjp/css-color@npm:5.1.11"
|
||||
"@asamuzakjp/css-color@npm:^6.0.5":
|
||||
version: 6.0.5
|
||||
resolution: "@asamuzakjp/css-color@npm:6.0.5"
|
||||
dependencies:
|
||||
"@asamuzakjp/generational-cache": "npm:^1.0.1"
|
||||
"@csstools/css-calc": "npm:^3.2.0"
|
||||
"@csstools/css-color-parser": "npm:^4.1.0"
|
||||
"@csstools/css-calc": "npm:^3.2.1"
|
||||
"@csstools/css-color-parser": "npm:^4.1.9"
|
||||
"@csstools/css-parser-algorithms": "npm:^4.0.0"
|
||||
"@csstools/css-tokenizer": "npm:^4.0.0"
|
||||
checksum: 10c0/32720bdff8daea6a8847aba6cdfae55baa3b4a2690b51d21db7f0382bbd183f3d9f2d5126df50afd889062635684b2819e47113629ee2e80c99389e75f48d060
|
||||
lru-cache: "npm:^11.5.2"
|
||||
checksum: 10c0/c08cc6bcea92c5e04fac208fbdbd125ed89e0eeca258df48819878347c75f90c3eb3a52940049fcb580ac9afe83c1d6bbf4e4caee0f8c2655cf47286f6ce3f09
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@asamuzakjp/dom-selector@npm:^7.1.1":
|
||||
version: 7.1.1
|
||||
resolution: "@asamuzakjp/dom-selector@npm:7.1.1"
|
||||
"@asamuzakjp/dom-selector@npm:^8.3.0":
|
||||
version: 8.3.0
|
||||
resolution: "@asamuzakjp/dom-selector@npm:8.3.0"
|
||||
dependencies:
|
||||
"@asamuzakjp/generational-cache": "npm:^1.0.1"
|
||||
"@asamuzakjp/nwsapi": "npm:^2.3.9"
|
||||
bidi-js: "npm:^1.0.3"
|
||||
css-tree: "npm:^3.2.1"
|
||||
is-potential-custom-element-name: "npm:^1.0.1"
|
||||
checksum: 10c0/8cec1c618781c94de5836a215bbe5aafb4d8b835b18c51faf8547f4574afa39f92def3951e40123860062467613dd825f1e1600ff32e8045cc099a91796dcfb8
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@asamuzakjp/generational-cache@npm:^1.0.1":
|
||||
version: 1.0.1
|
||||
resolution: "@asamuzakjp/generational-cache@npm:1.0.1"
|
||||
checksum: 10c0/1de62de43764e13fca3b9a31b7ea9b1bf0780fe053d266e40378a19ff8c66b543e011e6a0df02d410cd59bf981126706f176cdbb938985165202c4a079fe1057
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@asamuzakjp/nwsapi@npm:^2.3.9":
|
||||
version: 2.3.9
|
||||
resolution: "@asamuzakjp/nwsapi@npm:2.3.9"
|
||||
checksum: 10c0/869b81382e775499c96c45c6dbe0d0766a6da04bcf0abb79f5333535c4e19946851acaa43398f896e2ecc5a1de9cf3db7cf8c4b1afac1ee3d15e21584546d74d
|
||||
lru-cache: "npm:^11.5.2"
|
||||
checksum: 10c0/3f541cb7dd4ab1c6762802c0c908487ddbf5a2434b3ddf91b145c84272f0110fa6b02fc9baf879aa5bc3c2968dc702fdbaadfa3b58ee5f42645cb0e2949cbbf6
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -1267,7 +1252,7 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@csstools/css-color-parser@npm:^4.1.0, @csstools/css-color-parser@npm:^4.1.9":
|
||||
"@csstools/css-color-parser@npm:^4.1.9":
|
||||
version: 4.1.9
|
||||
resolution: "@csstools/css-color-parser@npm:4.1.9"
|
||||
dependencies:
|
||||
@@ -1289,15 +1274,15 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@csstools/css-syntax-patches-for-csstree@npm:^1.1.3":
|
||||
version: 1.1.3
|
||||
resolution: "@csstools/css-syntax-patches-for-csstree@npm:1.1.3"
|
||||
"@csstools/css-syntax-patches-for-csstree@npm:^1.1.3, @csstools/css-syntax-patches-for-csstree@npm:^1.1.7":
|
||||
version: 1.1.7
|
||||
resolution: "@csstools/css-syntax-patches-for-csstree@npm:1.1.7"
|
||||
peerDependencies:
|
||||
css-tree: ^3.2.1
|
||||
peerDependenciesMeta:
|
||||
css-tree:
|
||||
optional: true
|
||||
checksum: 10c0/3b8a686710a46bb460f9d560d52ce0de315828e6d452002b692013e95fbf53669d7a71e28c9b6b1333fa9f37f058fad93e5db3b8516444907713cb9aad299ce1
|
||||
checksum: 10c0/cdebc36196f951f4436132f5346927c8aeff2917a1c2af42ad36eb87a2b1883c8cd21cb6b3105e951ae0fa964d2ebda6309bae476d232d27f0ec657199df6bb6
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -2461,15 +2446,15 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@exodus/bytes@npm:^1.11.0, @exodus/bytes@npm:^1.15.0, @exodus/bytes@npm:^1.6.0":
|
||||
version: 1.15.0
|
||||
resolution: "@exodus/bytes@npm:1.15.0"
|
||||
"@exodus/bytes@npm:^1.11.0, @exodus/bytes@npm:^1.15.1, @exodus/bytes@npm:^1.6.0":
|
||||
version: 1.15.1
|
||||
resolution: "@exodus/bytes@npm:1.15.1"
|
||||
peerDependencies:
|
||||
"@noble/hashes": ^1.8.0 || ^2.0.0
|
||||
peerDependenciesMeta:
|
||||
"@noble/hashes":
|
||||
optional: true
|
||||
checksum: 10c0/b48aad9729653385d6ed055c28cfcf0b1b1481cf5d83f4375c12abd7988f1d20f69c80b5f95d4a1cc24d9abe32b9efc352a812d53884c26efea172aca8b6356d
|
||||
checksum: 10c0/333056a6953bbf875d9f3b86c32314de29458d842e5f56f6ef8034b18c2d9660184550093d1bae5de0064043d5e23f54cc03148798d9d29cf5167ac03f2e9f8c
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -3134,7 +3119,7 @@ __metadata:
|
||||
express: "npm:^5.1.0"
|
||||
globals: "npm:^17.3.0"
|
||||
ioredis: "npm:^5.3.2"
|
||||
jsdom: "npm:^29.0.0"
|
||||
jsdom: "npm:^30.0.0"
|
||||
pg: "npm:^8.5.0"
|
||||
pg-connection-string: "npm:^2.6.0"
|
||||
pino: "npm:^10.0.0"
|
||||
@@ -9454,37 +9439,37 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"jsdom@npm:^29.0.0":
|
||||
version: 29.1.1
|
||||
resolution: "jsdom@npm:29.1.1"
|
||||
"jsdom@npm:^30.0.0":
|
||||
version: 30.0.1
|
||||
resolution: "jsdom@npm:30.0.1"
|
||||
dependencies:
|
||||
"@asamuzakjp/css-color": "npm:^5.1.11"
|
||||
"@asamuzakjp/dom-selector": "npm:^7.1.1"
|
||||
"@asamuzakjp/css-color": "npm:^6.0.5"
|
||||
"@asamuzakjp/dom-selector": "npm:^8.3.0"
|
||||
"@bramus/specificity": "npm:^2.4.2"
|
||||
"@csstools/css-syntax-patches-for-csstree": "npm:^1.1.3"
|
||||
"@exodus/bytes": "npm:^1.15.0"
|
||||
"@csstools/css-syntax-patches-for-csstree": "npm:^1.1.7"
|
||||
"@exodus/bytes": "npm:^1.15.1"
|
||||
css-tree: "npm:^3.2.1"
|
||||
data-urls: "npm:^7.0.0"
|
||||
decimal.js: "npm:^10.6.0"
|
||||
html-encoding-sniffer: "npm:^6.0.0"
|
||||
is-potential-custom-element-name: "npm:^1.0.1"
|
||||
lru-cache: "npm:^11.3.5"
|
||||
lru-cache: "npm:^11.5.2"
|
||||
parse5: "npm:^8.0.1"
|
||||
saxes: "npm:^6.0.0"
|
||||
symbol-tree: "npm:^3.2.4"
|
||||
tough-cookie: "npm:^6.0.1"
|
||||
undici: "npm:^7.25.0"
|
||||
tough-cookie: "npm:^6.0.2"
|
||||
undici: "npm:^8.9.0"
|
||||
w3c-xmlserializer: "npm:^5.0.0"
|
||||
webidl-conversions: "npm:^8.0.1"
|
||||
whatwg-mimetype: "npm:^5.0.0"
|
||||
whatwg-url: "npm:^16.0.1"
|
||||
whatwg-url: "npm:^17.1.0"
|
||||
xml-name-validator: "npm:^5.0.0"
|
||||
peerDependencies:
|
||||
canvas: ^3.0.0
|
||||
canvas: ^3.2.3
|
||||
peerDependenciesMeta:
|
||||
canvas:
|
||||
optional: true
|
||||
checksum: 10c0/20e2174b09d9d06393cb48e1392b7a1cb7191d6656a6f7b3b8fbf9853b4ab0ef60b4a42c2c55f71b55ca5da50ffa75bcdc6986210963182e7993c6f9cd4f499b
|
||||
checksum: 10c0/2e3c04c30da46f373259b33ffb1a7786d351370aada3bfa3d7766dc97956659727dc78f49e01813b313e873d32851c842dc319b89d099f9e9decb55339dca155
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -9953,10 +9938,10 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"lru-cache@npm:^11.0.0, lru-cache@npm:^11.3.5":
|
||||
version: 11.3.5
|
||||
resolution: "lru-cache@npm:11.3.5"
|
||||
checksum: 10c0/5b54ef7b88afb4bd25b7a778f1b2b1cde32d9770913e530da34ab203cf0442413bcaa6e372800cbab9562557a4480e4d8bf32e3a368bb5a91b12218eca085c66
|
||||
"lru-cache@npm:^11.0.0, lru-cache@npm:^11.5.2":
|
||||
version: 11.5.2
|
||||
resolution: "lru-cache@npm:11.5.2"
|
||||
checksum: 10c0/ece1ad731f5b655e85d67047d04bfc13823dc77aa61c5454924a9869ba600a0104e39cc33d726021feef812bc347ca34a5608a5eb1972a5dd0870b7ecd42c3f2
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -13982,12 +13967,12 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"tough-cookie@npm:^6.0.0, tough-cookie@npm:^6.0.1":
|
||||
version: 6.0.1
|
||||
resolution: "tough-cookie@npm:6.0.1"
|
||||
"tough-cookie@npm:^6.0.0, tough-cookie@npm:^6.0.2":
|
||||
version: 6.0.2
|
||||
resolution: "tough-cookie@npm:6.0.2"
|
||||
dependencies:
|
||||
tldts: "npm:^7.0.5"
|
||||
checksum: 10c0/ec70bd6b1215efe4ed31a158f0be3e4c9088fcbd8620edc23a5860d4f3d85c757b77e274baaa700f7b25e409f4181552ed189603c2b2e1a9f88104da3a61a37d
|
||||
checksum: 10c0/5ff521a476a3c540821352125a5d481c8d2fe16035de7e0efda4df120f290c95500a0e9b51ea0aa56343955be482e014c30f5ba73e04b93ba138e4e855cb9e89
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -14285,10 +14270,10 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"undici@npm:^7.25.0":
|
||||
version: 7.25.0
|
||||
resolution: "undici@npm:7.25.0"
|
||||
checksum: 10c0/02a0b45dc14eb91bc488948750232450fe52f27a6b08086d6ac6736bb47908d600fe3a96d346f12eab24729c782e5c2f693bc8e8eca6696d4e4c09b1ed4cb4ec
|
||||
"undici@npm:^8.9.0":
|
||||
version: 8.9.0
|
||||
resolution: "undici@npm:8.9.0"
|
||||
checksum: 10c0/e3d9fa35a9aa8360d9f56e66bd372f451ee053e25066a97fd9fab3816267035660f67870c6d709a58a5411551657af78c4475be5b31c113b04f70251309900d0
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -14813,7 +14798,7 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"whatwg-url@npm:^16.0.0, whatwg-url@npm:^16.0.1":
|
||||
"whatwg-url@npm:^16.0.0":
|
||||
version: 16.0.1
|
||||
resolution: "whatwg-url@npm:16.0.1"
|
||||
dependencies:
|
||||
@@ -14824,6 +14809,17 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"whatwg-url@npm:^17.1.0":
|
||||
version: 17.1.0
|
||||
resolution: "whatwg-url@npm:17.1.0"
|
||||
dependencies:
|
||||
"@exodus/bytes": "npm:^1.15.1"
|
||||
tr46: "npm:^6.0.0"
|
||||
webidl-conversions: "npm:^8.0.1"
|
||||
checksum: 10c0/08fe809e90e1d20f6de631c9cdf312623fe5526731dc176ad38967c7d0f34e6e9700cbc0bad5ecd3d5ea8c62737a487883948e85937432f3a598746d8e05e80e
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"whatwg-url@npm:^5.0.0":
|
||||
version: 5.0.0
|
||||
resolution: "whatwg-url@npm:5.0.0"
|
||||
|
||||
Reference in new issue
Block a user