Skip to content

Commit a27c224

Browse files
Cutlsdependabot[bot]ykztsClearlyClairekedamaDQ
authored
upstream (#5)
* Bump webpack from 4.43.0 to 4.44.0 (mastodon#14435) Bumps [webpack](https://github.com/webpack/webpack) from 4.43.0 to 4.44.0. - [Release notes](https://github.com/webpack/webpack/releases) - [Commits](webpack/webpack@v4.43.0...v4.44.0) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump tty-prompt from 0.21.0 to 0.22.0 (mastodon#14430) Bumps [tty-prompt](https://github.com/piotrmurach/tty-prompt) from 0.21.0 to 0.22.0. - [Release notes](https://github.com/piotrmurach/tty-prompt/releases) - [Changelog](https://github.com/piotrmurach/tty-prompt/blob/master/CHANGELOG.md) - [Commits](piotrmurach/tty-prompt@v0.21.0...v0.22.0) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump browserslist from 4.12.0 to 4.13.0 (mastodon#14409) Bumps [browserslist](https://github.com/browserslist/browserslist) from 4.12.0 to 4.13.0. - [Release notes](https://github.com/browserslist/browserslist/releases) - [Changelog](https://github.com/browserslist/browserslist/blob/master/CHANGELOG.md) - [Commits](browserslist/browserslist@4.12.0...4.13.0) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump sidekiq from 6.1.0 to 6.1.1 (mastodon#14427) Bumps [sidekiq](https://github.com/mperham/sidekiq) from 6.1.0 to 6.1.1. - [Release notes](https://github.com/mperham/sidekiq/releases) - [Changelog](https://github.com/mperham/sidekiq/blob/master/Changes.md) - [Commits](sidekiq/sidekiq@v6.1.0...v6.1.1) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump posix-spawn from 58465d2e213991f8afb13b984854a49fcdcc980c to 0.3.15 (mastodon#14433) Bumps [posix-spawn](https://github.com/rtomayko/posix-spawn) from 58465d2e213991f8afb13b984854a49fcdcc980c to 0.3.15. This release includes the previously tagged commit. - [Release notes](https://github.com/rtomayko/posix-spawn/releases) - [Commits](rtomayko/posix-spawn@58465d2...v0.3.15) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump strong_migrations from 0.6.8 to 0.7.1 (mastodon#14463) Bumps [strong_migrations](https://github.com/ankane/strong_migrations) from 0.6.8 to 0.7.1. - [Release notes](https://github.com/ankane/strong_migrations/releases) - [Changelog](https://github.com/ankane/strong_migrations/blob/master/CHANGELOG.md) - [Commits](ankane/strong_migrations@v0.6.8...v0.7.1) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump eslint from 6.8.0 to 7.5.0 (mastodon#14454) * Bump eslint from 6.8.0 to 7.5.0 Bumps [eslint](https://github.com/eslint/eslint) from 6.8.0 to 7.5.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md) - [Commits](eslint/eslint@v6.8.0...v7.5.0) Signed-off-by: dependabot[bot] <support@github.com> * Fix .codeclimate.yml Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Yamagishi Kazutoshi <ykzts@desire.sh> * Fix handling of Reject Follow when a matching follow relationship exists (mastodon#14479) * Add tests * Fix handling of Reject Follow when a matching follow relationship exists Regression from mastodon#12199 * Fix the hashtag judgment of the compose form to be the same as the server side (mastodon#14484) * Fix wrong proptypes for onEditAccountNote (mastodon#14481) Also add missing PropTypes to the correct component Fixes mastodon#14478 * Fix new audio player features not working on Safari (mastodon#14465) Fixes mastodon#14462 * helm: bump default image tag to v3.2.0 (mastodon#14476) * Change content-type to be always computed from file data (mastodon#14452) * Change content-type to be always computed from file data Restore previous behavior, detecting the content-type isn't very expensive, and some instances may serve files as application/octet-stream regardless of their true type, making fetching media from them fail, while it used to work pre-3.2.0. * Add test * Fix disabled boost icon being replaced by private boost icon on hover (mastodon#14456) Fixes mastodon#14455 * Fix audio player on Safari (mastodon#14485) * Fix thumbnail color extraction (mastodon#14464) * Fix contrast calculation for thumbnail color extraction Luminance calculation was using 0-255 RGB values instead of 0-1 sRGB values, leading to incorrectly-computed contrast values. Since we use ColorDiff already, just use its XYZ colorspace conversion code to get the value. * Require at least 3:1 contrast for both accent and foreground colors * Lower required contrast for the accent color * Fix audio/video player not using CDN_HOST in media paths on public pages (mastodon#14486) * Bump aws-partitions from 1.345.0 to 1.349.0 (mastodon#14489) Bumps [aws-partitions](https://github.com/aws/aws-sdk-ruby) from 1.345.0 to 1.349.0. - [Release notes](https://github.com/aws/aws-sdk-ruby/releases) - [Changelog](https://github.com/aws/aws-sdk-ruby/blob/master/gems/aws-partitions/CHANGELOG.md) - [Commits](https://github.com/aws/aws-sdk-ruby/commits) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump @babel/preset-env from 7.10.4 to 7.11.0 (mastodon#14502) Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.10.4 to 7.11.0. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.11.0/packages/babel-preset-env) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump expect from 26.1.0 to 26.2.0 (mastodon#14507) Bumps [expect](https://github.com/facebook/jest/tree/HEAD/packages/expect) from 26.1.0 to 26.2.0. - [Release notes](https://github.com/facebook/jest/releases) - [Changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md) - [Commits](https://github.com/facebook/jest/commits/v26.2.0/packages/expect) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump elasticsearch from 7.8.0 to 7.8.1 (mastodon#14501) Bumps [elasticsearch](https://github.com/elastic/elasticsearch-ruby) from 7.8.0 to 7.8.1. - [Release notes](https://github.com/elastic/elasticsearch-ruby/releases) - [Changelog](https://github.com/elastic/elasticsearch-ruby/blob/master/CHANGELOG.md) - [Commits](elastic/elasticsearch-ruby@v7.8.0...v7.8.1) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump rubocop-ast from 0.2.0 to 0.3.0 (mastodon#14498) Bumps [rubocop-ast](https://github.com/rubocop-hq/rubocop-ast) from 0.2.0 to 0.3.0. - [Release notes](https://github.com/rubocop-hq/rubocop-ast/releases) - [Changelog](https://github.com/rubocop-hq/rubocop-ast/blob/master/CHANGELOG.md) - [Commits](rubocop/rubocop-ast@v0.2.0...v0.3.0) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Fallback to previous, more approximative hashtag RE on older browsers (mastodon#14513) Fixes mastodon#14511 * Bump pghero from 2.6.0 to 2.7.0 (mastodon#14518) Bumps [pghero](https://github.com/ankane/pghero) from 2.6.0 to 2.7.0. - [Release notes](https://github.com/ankane/pghero/releases) - [Changelog](https://github.com/ankane/pghero/blob/master/CHANGELOG.md) - [Commits](ankane/pghero@v2.6.0...v2.7.0) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump eslint from 7.5.0 to 7.6.0 (mastodon#14508) Bumps [eslint](https://github.com/eslint/eslint) from 7.5.0 to 7.6.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md) - [Commits](eslint/eslint@v7.5.0...v7.6.0) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump excon from 0.75.0 to 0.76.0 (mastodon#14490) Bumps [excon](https://github.com/excon/excon) from 0.75.0 to 0.76.0. - [Release notes](https://github.com/excon/excon/releases) - [Changelog](https://github.com/excon/excon/blob/master/changelog.txt) - [Commits](excon/excon@v0.75.0...v0.76.0) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump csstype from 2.6.10 to 2.6.13 (mastodon#14503) Bumps [csstype](https://github.com/frenic/csstype) from 2.6.10 to 2.6.13. - [Release notes](https://github.com/frenic/csstype/releases) - [Commits](frenic/csstype@v2.6.10...v2.6.13) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump jest from 26.0.1 to 26.2.2 (mastodon#14495) Bumps [jest](https://github.com/facebook/jest) from 26.0.1 to 26.2.2. - [Release notes](https://github.com/facebook/jest/releases) - [Changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md) - [Commits](jestjs/jest@v26.0.1...v26.2.2) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump postcss-modules-local-by-default from 3.0.2 to 3.0.3 (mastodon#14505) Bumps [postcss-modules-local-by-default](https://github.com/css-modules/postcss-modules-local-by-default) from 3.0.2 to 3.0.3. - [Release notes](https://github.com/css-modules/postcss-modules-local-by-default/releases) - [Changelog](https://github.com/css-modules/postcss-modules-local-by-default/blob/master/CHANGELOG.md) - [Commits](css-modules/postcss-modules-local-by-default@v3.0.2...v3.0.3) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump dom-accessibility-api from 0.4.6 to 0.4.7 (mastodon#14496) Bumps [dom-accessibility-api](https://github.com/eps1lon/dom-accessibility-api) from 0.4.6 to 0.4.7. - [Release notes](https://github.com/eps1lon/dom-accessibility-api/releases) - [Changelog](https://github.com/eps1lon/dom-accessibility-api/blob/main/CHANGELOG.md) - [Commits](eps1lon/dom-accessibility-api@v0.4.6...v0.4.7) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump @testing-library/jest-dom from 5.11.0 to 5.11.2 (mastodon#14497) Bumps [@testing-library/jest-dom](https://github.com/testing-library/jest-dom) from 5.11.0 to 5.11.2. - [Release notes](https://github.com/testing-library/jest-dom/releases) - [Changelog](https://github.com/testing-library/jest-dom/blob/master/CHANGELOG.md) - [Commits](testing-library/jest-dom@v5.11.0...v5.11.2) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump minipass-pipeline from 1.2.3 to 1.2.4 (mastodon#14504) Bumps minipass-pipeline from 1.2.3 to 1.2.4. Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump node-notifier from 7.0.1 to 7.0.2 (mastodon#14499) Bumps [node-notifier](https://github.com/mikaelbr/node-notifier) from 7.0.1 to 7.0.2. - [Release notes](https://github.com/mikaelbr/node-notifier/releases) - [Changelog](https://github.com/mikaelbr/node-notifier/blob/master/CHANGELOG.md) - [Commits](mikaelbr/node-notifier@v7.0.1...v7.0.2) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Fix eslint error (mastodon#14521) * Fix crash when failing to load emoji picker (mastodon#14525) Fixes mastodon#14523 * Cache result of SQL (mastodon#14534) * Use default :edit routing (mastodon#14535) * Fix `tootctl media` commands not handling snowflake ids for media_attachments (mastodon#14536) * Add support for managing multiple stream subscriptions in a single connection (mastodon#14524) * Add HTML form validation for the registration form (mastodon#14560) * Add HTML-level validation of username in sign-up form * Make required fields with incorrect values more visible * Enable HTML form validation for the registration form * Mark agreement checkbox as required client-side * Add minimum length to password * Add client-side password confirmation validation * yarn.lock Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Yamagishi Kazutoshi <ykzts@desire.sh> Co-authored-by: ThibG <thib@sitedethib.com> Co-authored-by: kedama <kedama@foresdon.jp> Co-authored-by: Alex Dunn <dunn.alex@gmail.com> Co-authored-by: abcang <abcang1015@gmail.com> Co-authored-by: niwatori24 <62463593+niwatori24@users.noreply.github.com> Co-authored-by: Eugen Rochko <eugen@zeonfederated.com>
1 parent b1a2f97 commit a27c224

28 files changed

Lines changed: 1670 additions & 937 deletions

File tree

.codeclimate.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ plugins:
2727
enabled: true
2828
eslint:
2929
enabled: true
30-
channel: eslint-6
30+
channel: eslint-7
3131
rubocop:
3232
enabled: true
3333
channel: rubocop-0-82

Gemfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ gem 'e2mmap', '~> 0.1.0'
1717
gem 'hamlit-rails', '~> 0.2'
1818
gem 'pg', '~> 1.2'
1919
gem 'makara', '~> 0.4'
20-
gem 'pghero', '~> 2.6'
20+
gem 'pghero', '~> 2.7'
2121
gem 'dotenv-rails', '~> 2.7'
2222

2323
gem 'aws-sdk-s3', '~> 1.75', require: false
@@ -74,7 +74,7 @@ gem 'oj', '~> 3.10'
7474
gem 'ox', '~> 2.13'
7575
gem 'parslet'
7676
gem 'parallel', '~> 1.19'
77-
gem 'posix-spawn', git: 'https://github.com/rtomayko/posix-spawn', ref: '58465d2e213991f8afb13b984854a49fcdcc980c'
77+
gem 'posix-spawn'
7878
gem 'pundit', '~> 2.1'
7979
gem 'premailer-rails'
8080
gem 'rack-attack', '~> 6.3'
@@ -86,16 +86,16 @@ gem 'mario-redis-lock', '~> 1.2', require: 'redis_lock'
8686
gem 'rqrcode', '~> 1.1'
8787
gem 'ruby-progressbar', '~> 1.10'
8888
gem 'sanitize', '~> 5.2'
89-
gem 'sidekiq', '~> 6.0'
89+
gem 'sidekiq', '~> 6.1'
9090
gem 'sidekiq-scheduler', '~> 3.0'
9191
gem 'sidekiq-unique-jobs', '~> 6.0'
9292
gem 'sidekiq-bulk', '~>0.2.0'
9393
gem 'simple-navigation', '~> 4.1'
9494
gem 'simple_form', '~> 5.0'
9595
gem 'sprockets-rails', '~> 3.2', require: 'sprockets/railtie'
9696
gem 'stoplight', '~> 2.2.1'
97-
gem 'strong_migrations', '~> 0.6'
98-
gem 'tty-prompt', '~> 0.21', require: false
97+
gem 'strong_migrations', '~> 0.7'
98+
gem 'tty-prompt', '~> 0.22', require: false
9999
gem 'twitter-text', '~> 1.14'
100100
gem 'tzinfo-data', '~> 1.2020'
101101
gem 'webpacker', '~> 5.1'

Gemfile.lock

Lines changed: 25 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,6 @@ GIT
66
health_check (4.0.0.pre)
77
rails (>= 4.0)
88

9-
GIT
10-
remote: https://github.com/rtomayko/posix-spawn
11-
revision: 58465d2e213991f8afb13b984854a49fcdcc980c
12-
ref: 58465d2e213991f8afb13b984854a49fcdcc980c
13-
specs:
14-
posix-spawn (0.3.13)
15-
169
GIT
1710
remote: https://github.com/tmm1/http_parser.rb
1811
revision: 54b17ba8c7d8d20a16dfc65d1775241833219cf2
@@ -92,7 +85,7 @@ GEM
9285
av (0.9.0)
9386
cocaine (~> 0.5.3)
9487
aws-eventstream (1.1.0)
95-
aws-partitions (1.345.0)
88+
aws-partitions (1.349.0)
9689
aws-sdk-core (3.104.3)
9790
aws-eventstream (~> 1, >= 1.0.2)
9891
aws-partitions (~> 1, >= 1.239.0)
@@ -203,21 +196,20 @@ GEM
203196
railties (>= 3.2)
204197
e2mmap (0.1.0)
205198
ed25519 (1.2.4)
206-
elasticsearch (7.8.0)
207-
elasticsearch-api (= 7.8.0)
208-
elasticsearch-transport (= 7.8.0)
209-
elasticsearch-api (7.8.0)
199+
elasticsearch (7.8.1)
200+
elasticsearch-api (= 7.8.1)
201+
elasticsearch-transport (= 7.8.1)
202+
elasticsearch-api (7.8.1)
210203
multi_json
211204
elasticsearch-dsl (0.1.9)
212-
elasticsearch-transport (7.8.0)
205+
elasticsearch-transport (7.8.1)
213206
faraday (~> 1)
214207
multi_json
215208
encryptor (3.0.0)
216-
equatable (0.6.1)
217209
erubi (1.9.0)
218210
et-orbi (1.2.4)
219211
tzinfo
220-
excon (0.75.0)
212+
excon (0.76.0)
221213
fabrication (2.21.1)
222214
faker (2.13.0)
223215
i18n (>= 1.6, < 2)
@@ -368,7 +360,6 @@ GEM
368360
msgpack (1.3.3)
369361
multi_json (1.15.0)
370362
multipart-post (2.1.1)
371-
necromancer (0.5.1)
372363
net-ldap (0.16.2)
373364
net-scp (3.0.0)
374365
net-ssh (>= 2.6.5, < 7.0.0)
@@ -411,13 +402,13 @@ GEM
411402
parser (2.7.1.4)
412403
ast (~> 2.4.1)
413404
parslet (2.0.0)
414-
pastel (0.7.4)
415-
equatable (~> 0.6)
405+
pastel (0.8.0)
416406
tty-color (~> 0.5)
417407
pg (1.2.3)
418-
pghero (2.6.0)
408+
pghero (2.7.0)
419409
activerecord (>= 5)
420410
pkg-config (1.4.1)
411+
posix-spawn (0.3.15)
421412
premailer (1.12.1)
422413
addressable
423414
css_parser (>= 1.6.0)
@@ -552,8 +543,8 @@ GEM
552543
rubocop-ast (>= 0.0.3, < 1.0)
553544
ruby-progressbar (~> 1.7)
554545
unicode-display_width (>= 1.4.0, < 2.0)
555-
rubocop-ast (0.2.0)
556-
parser (>= 2.7.0.1)
546+
rubocop-ast (0.3.0)
547+
parser (>= 2.7.1.4)
557548
rubocop-rails (2.6.0)
558549
activesupport (>= 4.2.0)
559550
rack (>= 1.1)
@@ -569,7 +560,7 @@ GEM
569560
nokogiri (>= 1.8.0)
570561
nokogumbo (~> 2.0)
571562
semantic_range (2.3.0)
572-
sidekiq (6.1.0)
563+
sidekiq (6.1.1)
573564
connection_pool (>= 2.2.2)
574565
rack (~> 2.0)
575566
redis (>= 4.2.0)
@@ -610,7 +601,7 @@ GEM
610601
stoplight (2.2.1)
611602
streamio-ffmpeg (3.0.2)
612603
multi_json (~> 1.8)
613-
strong_migrations (0.6.8)
604+
strong_migrations (0.7.1)
614605
activerecord (>= 5)
615606
temple (0.8.2)
616607
terminal-table (1.8.0)
@@ -624,14 +615,13 @@ GEM
624615
tilt (2.0.10)
625616
tty-color (0.5.1)
626617
tty-cursor (0.7.1)
627-
tty-prompt (0.21.0)
628-
necromancer (~> 0.5.0)
629-
pastel (~> 0.7.0)
630-
tty-reader (~> 0.7.0)
631-
tty-reader (0.7.0)
618+
tty-prompt (0.22.0)
619+
pastel (~> 0.8)
620+
tty-reader (~> 0.8)
621+
tty-reader (0.8.0)
632622
tty-cursor (~> 0.7)
633-
tty-screen (~> 0.7)
634-
wisper (~> 2.0.0)
623+
tty-screen (~> 0.8)
624+
wisper (~> 2.0)
635625
tty-screen (0.8.1)
636626
twitter-text (1.14.7)
637627
unf (~> 0.1.0)
@@ -748,9 +738,9 @@ DEPENDENCIES
748738
parallel_tests (~> 3.1)
749739
parslet
750740
pg (~> 1.2)
751-
pghero (~> 2.6)
741+
pghero (~> 2.7)
752742
pkg-config (~> 1.4)
753-
posix-spawn!
743+
posix-spawn
754744
premailer-rails
755745
private_address_check (~> 0.5)
756746
pry-byebug (~> 3.9)
@@ -776,7 +766,7 @@ DEPENDENCIES
776766
rubocop-rails (~> 2.6)
777767
ruby-progressbar (~> 1.10)
778768
sanitize (~> 5.2)
779-
sidekiq (~> 6.0)
769+
sidekiq (~> 6.1)
780770
sidekiq-bulk (~> 0.2.0)
781771
sidekiq-scheduler (~> 3.0)
782772
sidekiq-unique-jobs (~> 6.0)
@@ -788,10 +778,10 @@ DEPENDENCIES
788778
stackprof
789779
stoplight (~> 2.2.1)
790780
streamio-ffmpeg (~> 3.0)
791-
strong_migrations (~> 0.6)
781+
strong_migrations (~> 0.7)
792782
thor (~> 0.20)
793783
thwait (~> 0.2.0)
794-
tty-prompt (~> 0.21)
784+
tty-prompt (~> 0.22)
795785
twitter-text (~> 1.14)
796786
tzinfo-data (~> 1.2020)
797787
webmock (~> 3.8)

app/javascript/mastodon/actions/streaming.js

Lines changed: 89 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// @ts-check
2+
13
import { connectStream } from '../stream';
24
import {
35
updateTimeline,
@@ -19,24 +21,59 @@ import { getLocale } from '../locales';
1921

2022
const { messages } = getLocale();
2123

22-
export function connectTimelineStream (timelineId, path, pollingRefresh = null, accept = null) {
24+
/**
25+
* @param {number} max
26+
* @return {number}
27+
*/
28+
const randomUpTo = max =>
29+
Math.floor(Math.random() * Math.floor(max));
2330

24-
return connectStream (path, pollingRefresh, (dispatch, getState) => {
31+
/**
32+
* @param {string} timelineId
33+
* @param {string} channelName
34+
* @param {Object.<string, string>} params
35+
* @param {Object} options
36+
* @param {function(Function, Function): void} [options.fallback]
37+
* @param {function(object): boolean} [options.accept]
38+
* @return {function(): void}
39+
*/
40+
export const connectTimelineStream = (timelineId, channelName, params = {}, options = {}) =>
41+
connectStream(channelName, params, (dispatch, getState) => {
2542
const locale = getState().getIn(['meta', 'locale']);
2643

44+
let pollingId;
45+
46+
/**
47+
* @param {function(Function, Function): void} fallback
48+
*/
49+
const useFallback = fallback => {
50+
fallback(dispatch, () => {
51+
pollingId = setTimeout(() => useFallback(fallback), 20000 + randomUpTo(20000));
52+
});
53+
};
54+
2755
return {
2856
onConnect() {
2957
dispatch(connectTimeline(timelineId));
58+
59+
if (pollingId) {
60+
clearTimeout(pollingId);
61+
pollingId = null;
62+
}
3063
},
3164

3265
onDisconnect() {
3366
dispatch(disconnectTimeline(timelineId));
67+
68+
if (options.fallback) {
69+
pollingId = setTimeout(() => useFallback(options.fallback), randomUpTo(40000));
70+
}
3471
},
3572

3673
onReceive (data) {
3774
switch(data.event) {
3875
case 'update':
39-
dispatch(updateTimeline(timelineId, JSON.parse(data.payload), accept));
76+
dispatch(updateTimeline(timelineId, JSON.parse(data.payload), options.accept));
4077
break;
4178
case 'delete':
4279
dispatch(deleteFromTimelines(data.payload));
@@ -63,17 +100,59 @@ export function connectTimelineStream (timelineId, path, pollingRefresh = null,
63100
},
64101
};
65102
});
66-
}
67103

104+
/**
105+
* @param {Function} dispatch
106+
* @param {function(): void} done
107+
*/
68108
const refreshHomeTimelineAndNotification = (dispatch, done) => {
69109
dispatch(expandHomeTimeline({}, () =>
70110
dispatch(expandNotifications({}, () =>
71111
dispatch(fetchAnnouncements(done))))));
72112
};
73113

74-
export const connectUserStream = () => connectTimelineStream('home', 'user', refreshHomeTimelineAndNotification);
75-
export const connectCommunityStream = ({ onlyMedia } = {}) => connectTimelineStream(`community${onlyMedia ? ':media' : ''}`, `public:local${onlyMedia ? ':media' : ''}`);
76-
export const connectPublicStream = ({ onlyMedia, onlyRemote } = {}) => connectTimelineStream(`public${onlyRemote ? ':remote' : ''}${onlyMedia ? ':media' : ''}`, `public${onlyRemote ? ':remote' : ''}${onlyMedia ? ':media' : ''}`);
77-
export const connectHashtagStream = (id, tag, local, accept) => connectTimelineStream(`hashtag:${id}${local ? ':local' : ''}`, `hashtag${local ? ':local' : ''}&tag=${tag}`, null, accept);
78-
export const connectDirectStream = () => connectTimelineStream('direct', 'direct');
79-
export const connectListStream = id => connectTimelineStream(`list:${id}`, `list&list=${id}`);
114+
/**
115+
* @return {function(): void}
116+
*/
117+
export const connectUserStream = () =>
118+
connectTimelineStream('home', 'user', {}, { fallback: refreshHomeTimelineAndNotification });
119+
120+
/**
121+
* @param {Object} options
122+
* @param {boolean} [options.onlyMedia]
123+
* @return {function(): void}
124+
*/
125+
export const connectCommunityStream = ({ onlyMedia } = {}) =>
126+
connectTimelineStream(`community${onlyMedia ? ':media' : ''}`, `public:local${onlyMedia ? ':media' : ''}`);
127+
128+
/**
129+
* @param {Object} options
130+
* @param {boolean} [options.onlyMedia]
131+
* @param {boolean} [options.onlyRemote]
132+
* @return {function(): void}
133+
*/
134+
export const connectPublicStream = ({ onlyMedia, onlyRemote } = {}) =>
135+
connectTimelineStream(`public${onlyRemote ? ':remote' : ''}${onlyMedia ? ':media' : ''}`, `public${onlyRemote ? ':remote' : ''}${onlyMedia ? ':media' : ''}`);
136+
137+
/**
138+
* @param {string} columnId
139+
* @param {string} tagName
140+
* @param {boolean} onlyLocal
141+
* @param {function(object): boolean} accept
142+
* @return {function(): void}
143+
*/
144+
export const connectHashtagStream = (columnId, tagName, onlyLocal, accept) =>
145+
connectTimelineStream(`hashtag:${columnId}${onlyLocal ? ':local' : ''}`, `hashtag${onlyLocal ? ':local' : ''}`, { tag: tagName }, { accept });
146+
147+
/**
148+
* @return {function(): void}
149+
*/
150+
export const connectDirectStream = () =>
151+
connectTimelineStream('direct', 'direct');
152+
153+
/**
154+
* @param {string} listId
155+
* @return {function(): void}
156+
*/
157+
export const connectListStream = listId =>
158+
connectTimelineStream(`list:${listId}`, 'list', { list: listId });

app/javascript/mastodon/features/account/components/header.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,16 @@ class Header extends ImmutablePureComponent {
6666
identity_props: ImmutablePropTypes.list,
6767
onFollow: PropTypes.func.isRequired,
6868
onBlock: PropTypes.func.isRequired,
69+
onMention: PropTypes.func.isRequired,
70+
onDirect: PropTypes.func.isRequired,
71+
onReport: PropTypes.func.isRequired,
72+
onReblogToggle: PropTypes.func.isRequired,
73+
onMute: PropTypes.func.isRequired,
74+
onBlockDomain: PropTypes.func.isRequired,
75+
onUnblockDomain: PropTypes.func.isRequired,
76+
onEndorseToggle: PropTypes.func.isRequired,
77+
onAddToList: PropTypes.func.isRequired,
78+
onEditAccountNote: PropTypes.func.isRequired,
6979
intl: PropTypes.object.isRequired,
7080
domain: PropTypes.string.isRequired,
7181
};

app/javascript/mastodon/features/account_timeline/components/header.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ export default class Header extends ImmutablePureComponent {
2323
onUnblockDomain: PropTypes.func.isRequired,
2424
onEndorseToggle: PropTypes.func.isRequired,
2525
onAddToList: PropTypes.func.isRequired,
26-
onEditAccountNote: PropTypes.func.isRequired,
2726
hideTabs: PropTypes.bool,
2827
domain: PropTypes.string.isRequired,
2928
};

0 commit comments

Comments
 (0)