diff --git a/.env.production.sample b/.env.production.sample
index d51144d969..12ca64a066 100644
--- a/.env.production.sample
+++ b/.env.production.sample
@@ -254,6 +254,12 @@ MAX_PROFILE_FIELDS=4
# Maximum allowed display name characters
MAX_DISPLAY_NAME_CHARS=30
+# Maximum allowed poll options
+MAX_POLL_OPTIONS=5
+
+# Maximum allowed poll option characters
+MAX_POLL_OPTION_CHARS=100
+
# Maximum image and video/audio upload sizes
# Units are in bytes
# 1048576 bytes equals 1 megabyte
diff --git a/Aptfile b/Aptfile
index 419d159ef6..b2cbad714d 100644
--- a/Aptfile
+++ b/Aptfile
@@ -22,7 +22,7 @@ libpixman-1-0
librsvg2-2
libthai-data
libthai0
-libvpx5
+libvpx[5-9]
libxcb-render0
libxcb-shm0
libxrender1
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index a5b80c7e29..4b2d1f3e84 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -70,6 +70,6 @@ The smaller the set of changes in the pull request is, the quicker it can be rev
## Documentation
-The [Mastodon documentation](https://docs.joinmastodon.org) is a statically generated site. You can [submit merge requests to mastodon/docs](https://source.joinmastodon.org/mastodon/docs).
+The [Mastodon documentation](https://docs.joinmastodon.org) is a statically generated site. You can [submit merge requests to tootsuite/documentation](https://github.com/tootsuite/documentation).
diff --git a/Gemfile b/Gemfile
index 004b3120c6..cfc392c3c7 100644
--- a/Gemfile
+++ b/Gemfile
@@ -13,7 +13,7 @@ gem 'rack', '~> 2.2.3'
gem 'hamlit-rails', '~> 0.2'
gem 'pg', '~> 1.2'
-gem 'makara', '~> 0.4'
+gem 'makara', '~> 0.5'
gem 'pghero', '~> 2.7'
gem 'dotenv-rails', '~> 2.7'
@@ -66,7 +66,7 @@ gem 'mime-types', '~> 3.3.1', require: 'mime/types/columnar'
gem 'nilsimsa', git: 'https://github.com/witgo/nilsimsa', ref: 'fd184883048b922b176939f851338d0a4971a532'
gem 'nokogiri', '~> 1.11'
gem 'nsa', '~> 0.2'
-gem 'oj', '~> 3.10'
+gem 'oj', '~> 3.11'
gem 'ox', '~> 2.14'
gem 'parslet'
gem 'parallel', '~> 1.20'
@@ -145,7 +145,7 @@ group :development do
gem 'brakeman', '~> 4.10', require: false
gem 'bundler-audit', '~> 0.7', require: false
- gem 'capistrano', '~> 3.14'
+ gem 'capistrano', '~> 3.15'
gem 'capistrano-rails', '~> 1.6'
gem 'capistrano-rbenv', '~> 2.2'
gem 'capistrano-yarn', '~> 2.0'
diff --git a/Gemfile.lock b/Gemfile.lock
index 8d6ce3e0ee..bea9f78784 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -116,7 +116,7 @@ GEM
bundler (>= 1.2.0, < 3)
thor (>= 0.18, < 2)
byebug (11.1.3)
- capistrano (3.14.1)
+ capistrano (3.15.0)
airbrussh (>= 1.0.0)
i18n
rake (>= 10.0.0)
@@ -155,7 +155,7 @@ GEM
climate_control (>= 0.0.3, < 1.0)
coderay (1.1.3)
color_diff (0.1)
- concurrent-ruby (1.1.7)
+ concurrent-ruby (1.1.8)
connection_pool (2.2.3)
cose (1.0.0)
cbor (~> 0.5.9)
@@ -272,7 +272,7 @@ GEM
httplog (1.4.3)
rack (>= 1.0)
rainbow (>= 2.0.0)
- i18n (1.8.5)
+ i18n (1.8.7)
concurrent-ruby (~> 1.0)
i18n-tasks (0.9.33)
activesupport (>= 4.0.2)
@@ -333,7 +333,7 @@ GEM
nokogiri (>= 1.5.9)
mail (2.7.1)
mini_mime (>= 0.1.1)
- makara (0.4.1)
+ makara (0.5.0)
activerecord (>= 3.0.0)
marcel (0.3.3)
mimemagic (~> 0.3.2)
@@ -350,7 +350,7 @@ GEM
mimemagic (0.3.5)
mini_mime (1.0.2)
mini_portile2 (2.5.0)
- minitest (5.14.2)
+ minitest (5.14.3)
msgpack (1.3.3)
multi_json (1.15.0)
multipart-post (2.1.1)
@@ -359,17 +359,17 @@ GEM
net-ssh (>= 2.6.5, < 7.0.0)
net-ssh (6.1.0)
nio4r (2.5.4)
- nokogiri (1.11.0)
+ nokogiri (1.11.1)
mini_portile2 (~> 2.5.0)
racc (~> 1.4)
- nokogumbo (2.0.2)
+ nokogumbo (2.0.4)
nokogiri (~> 1.8, >= 1.8.4)
nsa (0.2.7)
activesupport (>= 4.2, < 6)
concurrent-ruby (~> 1.0, >= 1.0.2)
sidekiq (>= 3.5)
statsd-ruby (~> 1.4, >= 1.4.0)
- oj (3.10.18)
+ oj (3.11.0)
omniauth (1.9.1)
hashie (>= 3.4.6)
rack (>= 1.6.2, < 3)
@@ -386,7 +386,7 @@ GEM
openssl (2.2.0)
openssl-signature_algorithm (0.4.0)
orm_adapter (0.5.0)
- ox (2.14.0)
+ ox (2.14.1)
paperclip (6.0.0)
activemodel (>= 4.2.0)
activesupport (>= 4.2.0)
@@ -561,7 +561,7 @@ GEM
fugit (~> 1.1, >= 1.1.6)
safety_net_attestation (0.4.0)
jwt (~> 2.0)
- sanitize (5.2.1)
+ sanitize (5.2.3)
crass (~> 1.0.2)
nokogiri (>= 1.8.0)
nokogumbo (~> 2.0)
@@ -592,7 +592,7 @@ GEM
simple_form (5.0.3)
actionpack (>= 5.0)
activemodel (>= 5.0)
- simplecov (0.21.0)
+ simplecov (0.21.2)
docile (~> 1.1)
simplecov-html (~> 0.11)
simplecov_json_formatter (~> 0.1)
@@ -605,7 +605,7 @@ GEM
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
- sshkit (1.21.0)
+ sshkit (1.21.1)
net-scp (>= 1.1.2)
net-ssh (>= 2.8.0)
stackprof (0.2.16)
@@ -613,7 +613,7 @@ GEM
stoplight (2.2.1)
streamio-ffmpeg (3.0.2)
multi_json (~> 1.8)
- strong_migrations (0.7.4)
+ strong_migrations (0.7.6)
activerecord (>= 5)
temple (0.8.2)
terminal-table (2.0.0)
@@ -661,7 +661,7 @@ GEM
safety_net_attestation (~> 0.4.0)
securecompare (~> 1.0)
tpm-key_attestation (~> 0.9.0)
- webmock (3.11.0)
+ webmock (3.11.1)
addressable (>= 2.3.6)
crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0)
@@ -698,7 +698,7 @@ DEPENDENCIES
browser
bullet (~> 6.1)
bundler-audit (~> 0.7)
- capistrano (~> 3.14)
+ capistrano (~> 3.15)
capistrano-rails (~> 1.6)
capistrano-rbenv (~> 2.2)
capistrano-yarn (~> 2.0)
@@ -741,7 +741,7 @@ DEPENDENCIES
letter_opener_web (~> 1.4)
link_header (~> 0.0)
lograge (~> 0.11)
- makara (~> 0.4)
+ makara (~> 0.5)
mario-redis-lock (~> 1.2)
memory_profiler
microformats (~> 4.2)
@@ -750,7 +750,7 @@ DEPENDENCIES
nilsimsa!
nokogiri (~> 1.11)
nsa (~> 0.2)
- oj (~> 3.10)
+ oj (~> 3.11)
omniauth (~> 1.9)
omniauth-cas (~> 2.0)
omniauth-rails_csrf_protection (~> 0.1)
diff --git a/app/controllers/api/v1/markers_controller.rb b/app/controllers/api/v1/markers_controller.rb
index 28c2ec7916..867e6facf4 100644
--- a/app/controllers/api/v1/markers_controller.rb
+++ b/app/controllers/api/v1/markers_controller.rb
@@ -7,7 +7,7 @@ class Api::V1::MarkersController < Api::BaseController
before_action :require_user!
def index
- @markers = current_user.markers.where(timeline: Array(params[:timeline])).each_with_object({}) { |marker, h| h[marker.timeline] = marker }
+ @markers = current_user.markers.where(timeline: Array(params[:timeline])).index_by(&:timeline)
render json: serialize_map(@markers)
end
diff --git a/app/controllers/concerns/cache_concern.rb b/app/controllers/concerns/cache_concern.rb
index 8d82eda5c1..3fb4b962a3 100644
--- a/app/controllers/concerns/cache_concern.rb
+++ b/app/controllers/concerns/cache_concern.rb
@@ -38,7 +38,7 @@ module CacheConcern
klass.reload_stale_associations!(cached_keys_with_value.values) if klass.respond_to?(:reload_stale_associations!)
unless uncached_ids.empty?
- uncached = klass.where(id: uncached_ids).with_includes.each_with_object({}) { |item, h| h[item.id] = item }
+ uncached = klass.where(id: uncached_ids).with_includes.index_by(&:id)
uncached.each_value do |item|
Rails.cache.write(item, item)
diff --git a/app/controllers/statuses_controller.rb b/app/controllers/statuses_controller.rb
index a6ab8828f2..3290224b4e 100644
--- a/app/controllers/statuses_controller.rb
+++ b/app/controllers/statuses_controller.rb
@@ -8,7 +8,7 @@ class StatusesController < ApplicationController
layout 'public'
- before_action :require_signature!, only: :show, if: -> { request.format == :json && authorized_fetch_mode? }
+ before_action :require_signature!, only: [:show, :activity], if: -> { request.format == :json && authorized_fetch_mode? }
before_action :set_status
before_action :set_instance_presenter
before_action :set_link_headers
diff --git a/app/javascript/flavours/glitch/components/poll.js b/app/javascript/flavours/glitch/components/poll.js
index 6f57c19509..f230823cc3 100644
--- a/app/javascript/flavours/glitch/components/poll.js
+++ b/app/javascript/flavours/glitch/components/poll.js
@@ -153,7 +153,7 @@ class Poll extends ImmutablePureComponent {
}
diff --git a/app/javascript/flavours/glitch/components/status_content.js b/app/javascript/flavours/glitch/components/status_content.js
index 76e2d79a55..61a28e9a76 100644
--- a/app/javascript/flavours/glitch/components/status_content.js
+++ b/app/javascript/flavours/glitch/components/status_content.js
@@ -327,7 +327,7 @@ export default class StatusContent extends React.PureComponent {
-
+
{' '}