Merge branch 'master' into glitch-soc/merge-upstream
This commit is contained in:
@@ -6,6 +6,6 @@ class Api::V1::InstancesController < Api::BaseController
|
||||
|
||||
def show
|
||||
expires_in 3.minutes, public: true
|
||||
render_with_cache json: {}, serializer: REST::InstanceSerializer
|
||||
render_with_cache json: {}, serializer: REST::InstanceSerializer, root: 'instance'
|
||||
end
|
||||
end
|
||||
|
||||
@@ -5,6 +5,6 @@ class ManifestsController < ApplicationController
|
||||
|
||||
def show
|
||||
expires_in 3.minutes, public: true
|
||||
render json: InstancePresenter.new, serializer: ManifestSerializer
|
||||
render json: InstancePresenter.new, serializer: ManifestSerializer, root: 'instance'
|
||||
end
|
||||
end
|
||||
|
||||
@@ -5,7 +5,7 @@ module WellKnown
|
||||
before_action :check_enabled
|
||||
|
||||
def show
|
||||
render json: {}, serializer: ProofProvider::Keybase::ConfigSerializer
|
||||
render json: {}, serializer: ProofProvider::Keybase::ConfigSerializer, root: 'keybase_config'
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
@@ -2015,6 +2015,10 @@ a.account__display-name {
|
||||
|
||||
.scrollable {
|
||||
overflow: visible;
|
||||
|
||||
@supports(display: grid) {
|
||||
contain: content;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: $no-gap-breakpoint) {
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
# See also: USERNAME_RE in the Account class
|
||||
|
||||
class UniqueUsernameValidator < ActiveModel::Validator
|
||||
def validate(account)
|
||||
return if account.username.nil?
|
||||
|
||||
normalized_username = account.username.downcase.delete('.')
|
||||
normalized_username = account.username.downcase
|
||||
|
||||
scope = Account.where(domain: nil).where('lower(username) = ?', normalized_username)
|
||||
scope = scope.where.not(id: account.id) if account.persisted?
|
||||
|
||||
Reference in New Issue
Block a user