Merge branch 'main' into glitch-soc/merge-upstream

Conflicts:
- `package.json`:
  Not a real conflict, upstream dependency updated textually too close to a
  glitch-soc-only dependency.
  Updated the upstream dependency.
This commit is contained in:
Claire
2022-04-27 08:48:21 +02:00
10 changed files with 216 additions and 126 deletions

View File

@@ -561,6 +561,12 @@ class Account < ApplicationRecord
before_validation :prepare_username, on: :create
before_destroy :clean_feed_manager
def ensure_keys!
return unless local? && private_key.blank? && public_key.blank?
generate_keys
save!
end
private
def prepare_contents