]> cat aescling's git repositories - mastodon.git/commitdiff
Merge branch 'main' into glitch-soc/merge-upstream
authorClaire <claire.github-309c@sitedethib.com>
Sun, 11 Jul 2021 19:41:23 +0000 (21:41 +0200)
committerClaire <claire.github-309c@sitedethib.com>
Sun, 11 Jul 2021 19:41:23 +0000 (21:41 +0200)
Conflicts:
- `app/serializers/rest/instance_serializer.rb`:
  Upstream changed the fields returned by /api/v1/instance by adding a
  `configuration` field holding a lot of useful information making our
  `max_toot_chars` and `poll_limits` fields obsolete.
  Keeping those around for now for compatibility.
- `app/validators/status_length_validator.rb`:
  No real conflict, just URL_PLACEHOLDER_CHARS introduced too close to
  MAX_CHARS which is defined differently in glitch-soc.
  Ported upstream changes.

1  2 
Gemfile
Gemfile.lock
app/serializers/rest/instance_serializer.rb
app/validators/status_length_validator.rb
package.json
yarn.lock

diff --cc Gemfile
Simple merge
diff --cc Gemfile.lock
index 04f8be599ba6f7cce91ae191043e2e522f11f713,3db3ea786ef92dd8e8785c01d3df5fcd13bfe42c..f17bcd87acc0deae8a3a417736e192d9ace36bd0
@@@ -763,10 -761,8 +762,9 @@@ DEPENDENCIE
    rails-i18n (~> 6.0)
    rails-settings-cached (~> 0.6)
    rdf-normalize (~> 0.4)
 +  redcarpet (~> 3.5)
    redis (~> 4.3)
    redis-namespace (~> 1.8)
-   resolv (~> 0.1.0)
    rqrcode (~> 2.0)
    rspec-rails (~> 5.0)
    rspec-sidekiq (~> 3.1)
index ae8b80fb7f26a5ce5612ea0427fad0efa3394173,0dc44b6239ccf041ccf7c9f3a9523938cbde0798..48bbb55c8180cc571d0de97b02fab0821a6ddd57
@@@ -4,8 -4,9 +4,9 @@@ class REST::InstanceSerializer < Active
    include RoutingHelper
  
    attributes :uri, :title, :short_description, :description, :email,
 -             :version, :urls, :stats, :thumbnail,
 +             :version, :urls, :stats, :thumbnail, :max_toot_chars, :poll_limits,
-              :languages, :registrations, :approval_required, :invites_enabled
+              :languages, :registrations, :approval_required, :invites_enabled,
+              :configuration
  
    has_one :contact_account, serializer: REST::AccountSerializer
  
index 11997024fba1ec3252ca320206dad3fce7aaa72a,4c258ec16ef8ddec03a5632193d7a297caf13b40..2a3ac8862a679d916a8bd8d85066fd3a663034c8
@@@ -1,8 -1,9 +1,9 @@@
  # frozen_string_literal: true
  
  class StatusLengthValidator < ActiveModel::Validator
 -  MAX_CHARS = 500
 +  MAX_CHARS = (ENV['MAX_TOOT_CHARS'] || 500).to_i
-   URL_PLACEHOLDER = "\1#{'x' * 23}"
+   URL_PLACEHOLDER_CHARS = 23
+   URL_PLACEHOLDER = "\1#{'x' * URL_PLACEHOLDER_CHARS}"
  
    def validate(status)
      return unless status.local? && !status.reblog?
diff --cc package.json
Simple merge
diff --cc yarn.lock
Simple merge