about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2019-07-24 16:53:25 +0200
committerGitHub <noreply@github.com>2019-07-24 16:53:25 +0200
commit88e79c179a1a48feff3b16226c46f5885442651e (patch)
tree020d6a6ef6b4a236f14d6287e4ff97c0750db3c9 /app
parente3a551cbd1f894fa779dc55168e56bb5f07b3d72 (diff)
parent2d35e4460a6c55930568d4b19563f9894d89e79b (diff)
Merge pull request #1176 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app')
-rw-r--r--app/controllers/api/v1/instances_controller.rb2
-rw-r--r--app/controllers/manifests_controller.rb2
-rw-r--r--app/controllers/well_known/keybase_proof_config_controller.rb2
-rw-r--r--app/javascript/styles/mastodon/components.scss4
-rw-r--r--app/validators/unique_username_validator.rb4
5 files changed, 10 insertions, 4 deletions
diff --git a/app/controllers/api/v1/instances_controller.rb b/app/controllers/api/v1/instances_controller.rb
index b68c78615..93e4f0003 100644
--- a/app/controllers/api/v1/instances_controller.rb
+++ b/app/controllers/api/v1/instances_controller.rb
@@ -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
diff --git a/app/controllers/manifests_controller.rb b/app/controllers/manifests_controller.rb
index 1e5db4393..491cde745 100644
--- a/app/controllers/manifests_controller.rb
+++ b/app/controllers/manifests_controller.rb
@@ -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
diff --git a/app/controllers/well_known/keybase_proof_config_controller.rb b/app/controllers/well_known/keybase_proof_config_controller.rb
index c78683a8d..03232df2d 100644
--- a/app/controllers/well_known/keybase_proof_config_controller.rb
+++ b/app/controllers/well_known/keybase_proof_config_controller.rb
@@ -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
diff --git a/app/javascript/styles/mastodon/components.scss b/app/javascript/styles/mastodon/components.scss
index 1ff0b234e..4d0adc229 100644
--- a/app/javascript/styles/mastodon/components.scss
+++ b/app/javascript/styles/mastodon/components.scss
@@ -2015,6 +2015,10 @@ a.account__display-name {
 
   .scrollable {
     overflow: visible;
+
+    @supports(display: grid) {
+      contain: content;
+    }
   }
 
   @media screen and (min-width: $no-gap-breakpoint) {
diff --git a/app/validators/unique_username_validator.rb b/app/validators/unique_username_validator.rb
index fb67105dd..4e24e3f5f 100644
--- a/app/validators/unique_username_validator.rb
+++ b/app/validators/unique_username_validator.rb
@@ -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?