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

This commit is contained in:
Thibaut Girka
2019-07-24 16:23:53 +02:00
11 changed files with 146 additions and 119 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -2015,6 +2015,10 @@ a.account__display-name {
.scrollable {
overflow: visible;
@supports(display: grid) {
contain: content;
}
}
@media screen and (min-width: $no-gap-breakpoint) {

View File

@@ -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?