Browse Source

Merge branch 'v2.8.0-branch' of asonix/mastodon into asonix/changes

Arlo (Hyena) 3 months ago
parent
commit
f7ef83d30e
100 changed files with 2168 additions and 891 deletions
  1. 5
    0
      .eslintrc.js
  2. 1
    1
      .node-version
  3. 1
    1
      .rubocop.yml
  4. 186
    83
      AUTHORS.md
  5. 83
    0
      CHANGELOG.md
  6. 123
    85
      Dockerfile
  7. 14
    14
      Gemfile
  8. 121
    120
      Gemfile.lock
  9. 12
    1
      Vagrantfile
  10. 1
    1
      app/chewy/statuses_index.rb
  11. 9
    21
      app/controllers/about_controller.rb
  12. 28
    6
      app/controllers/accounts_controller.rb
  13. 11
    5
      app/controllers/activitypub/collections_controller.rb
  14. 16
    3
      app/controllers/activitypub/inboxes_controller.rb
  15. 6
    0
      app/controllers/activitypub/outboxes_controller.rb
  16. 15
    2
      app/controllers/admin/accounts_controller.rb
  17. 2
    1
      app/controllers/admin/dashboard_controller.rb
  18. 52
    0
      app/controllers/admin/pending_accounts_controller.rb
  19. 9
    65
      app/controllers/admin/settings_controller.rb
  20. 3
    1
      app/controllers/api/base_controller.rb
  21. 30
    0
      app/controllers/api/proofs_controller.rb
  22. 5
    1
      app/controllers/api/v1/accounts/follower_accounts_controller.rb
  23. 5
    1
      app/controllers/api/v1/accounts/following_accounts_controller.rb
  24. 19
    0
      app/controllers/api/v1/accounts/identity_proofs_controller.rb
  25. 3
    2
      app/controllers/api/v1/accounts/search_controller.rb
  26. 11
    0
      app/controllers/api/v1/accounts/statuses_controller.rb
  27. 5
    1
      app/controllers/api/v1/accounts_controller.rb
  28. 29
    0
      app/controllers/api/v1/polls/votes_controller.rb
  29. 13
    0
      app/controllers/api/v1/polls_controller.rb
  30. 12
    0
      app/controllers/api/v1/preferences_controller.rb
  31. 9
    17
      app/controllers/api/v1/search_controller.rb
  32. 5
    1
      app/controllers/api/v1/statuses/reblogs_controller.rb
  33. 16
    2
      app/controllers/api/v1/statuses_controller.rb
  34. 1
    1
      app/controllers/api/v1/timelines/tag_controller.rb
  35. 1
    1
      app/controllers/api/v2/search_controller.rb
  36. 5
    0
      app/controllers/application_controller.rb
  37. 10
    5
      app/controllers/auth/registrations_controller.rb
  38. 17
    3
      app/controllers/concerns/account_controller_concern.rb
  39. 1
    1
      app/controllers/directories_controller.rb
  40. 9
    0
      app/controllers/follower_accounts_controller.rb
  41. 9
    0
      app/controllers/following_accounts_controller.rb
  42. 1
    1
      app/controllers/home_controller.rb
  43. 34
    0
      app/controllers/public_timelines_controller.rb
  44. 104
    0
      app/controllers/relationships_controller.rb
  45. 16
    2
      app/controllers/settings/exports_controller.rb
  46. 51
    0
      app/controllers/settings/featured_tags_controller.rb
  47. 0
    28
      app/controllers/settings/follower_domains_controller.rb
  48. 63
    0
      app/controllers/settings/identity_proofs_controller.rb
  49. 2
    1
      app/controllers/settings/preferences_controller.rb
  50. 1
    1
      app/controllers/settings/profiles_controller.rb
  51. 1
    0
      app/controllers/settings/sessions_controller.rb
  52. 1
    1
      app/controllers/shares_controller.rb
  53. 56
    1
      app/controllers/statuses_controller.rb
  54. 6
    12
      app/controllers/tags_controller.rb
  55. 9
    0
      app/controllers/well_known/keybase_proof_config_controller.rb
  56. 36
    36
      app/helpers/admin/action_logs_helper.rb
  57. 10
    0
      app/helpers/admin/dashboard_helper.rb
  58. 3
    2
      app/helpers/admin/filter_helper.rb
  59. 22
    1
      app/helpers/application_helper.rb
  60. 18
    0
      app/helpers/home_helper.rb
  61. 24
    1
      app/helpers/jsonld_helper.rb
  62. 12
    4
      app/helpers/settings_helper.rb
  63. 12
    2
      app/helpers/stream_entries_helper.rb
  64. 1
    0
      app/javascript/images/logo_transparent_black.svg
  65. BIN
      app/javascript/images/proof_providers/keybase.png
  66. 7
    2
      app/javascript/mastodon/actions/alerts.js
  67. 87
    10
      app/javascript/mastodon/actions/compose.js
  68. 30
    0
      app/javascript/mastodon/actions/identity_proofs.js
  69. 20
    7
      app/javascript/mastodon/actions/importer/index.js
  70. 17
    0
      app/javascript/mastodon/actions/importer/normalizer.js
  71. 3
    1
      app/javascript/mastodon/actions/notifications.js
  72. 60
    0
      app/javascript/mastodon/actions/polls.js
  73. 1
    0
      app/javascript/mastodon/actions/search.js
  74. 5
    1
      app/javascript/mastodon/actions/statuses.js
  75. 6
    0
      app/javascript/mastodon/actions/streaming.js
  76. 8
    0
      app/javascript/mastodon/actions/timelines.js
  77. 6
    2
      app/javascript/mastodon/api.js
  78. 3
    2
      app/javascript/mastodon/components/attachment_list.js
  79. 2
    1
      app/javascript/mastodon/components/column_back_button.js
  80. 2
    1
      app/javascript/mastodon/components/column_back_button_slim.js
  81. 8
    7
      app/javascript/mastodon/components/column_header.js
  82. 39
    0
      app/javascript/mastodon/components/error_boundary.js
  83. 21
    0
      app/javascript/mastodon/components/icon.js
  84. 5
    2
      app/javascript/mastodon/components/icon_button.js
  85. 2
    1
      app/javascript/mastodon/components/load_gap.js
  86. 140
    0
      app/javascript/mastodon/components/poll.js
  87. 28
    2
      app/javascript/mastodon/components/relative_timestamp.js
  88. 8
    4
      app/javascript/mastodon/components/status.js
  89. 23
    1
      app/javascript/mastodon/components/status_action_bar.js
  90. 6
    3
      app/javascript/mastodon/components/status_content.js
  91. 4
    1
      app/javascript/mastodon/containers/mastodon.js
  92. 4
    2
      app/javascript/mastodon/containers/media_container.js
  93. 8
    0
      app/javascript/mastodon/containers/poll_container.js
  94. 8
    1
      app/javascript/mastodon/containers/status_container.js
  95. 5
    7
      app/javascript/mastodon/containers/timeline_container.js
  96. 0
    190
      app/javascript/mastodon/features/account/components/action_bar.js
  97. 192
    102
      app/javascript/mastodon/features/account/components/header.js
  98. 2
    1
      app/javascript/mastodon/features/account_gallery/components/media_item.js
  99. 12
    1
      app/javascript/mastodon/features/account_gallery/index.js
  100. 0
    0
      app/javascript/mastodon/features/account_timeline/components/header.js

+ 5
- 0
.eslintrc.js View File

@@ -41,6 +41,11 @@ module.exports = {
41 41
       'node_modules',
42 42
       '\\.(css|scss|json)$',
43 43
     ],
44
+    'import/resolver': {
45
+      node: {
46
+        paths: ['app/javascript'],
47
+      },
48
+    },
44 49
   },
45 50
 
46 51
   rules: {

+ 1
- 1
.node-version View File

@@ -1 +1 @@
1
-9.11.1
1
+10.15.3

+ 1
- 1
.rubocop.yml View File

@@ -80,7 +80,7 @@ Rails/HttpStatus:
80 80
 Rails/Exit:
81 81
   Exclude:
82 82
     - 'lib/mastodon/*'
83
-    - 'lib/cli'
83
+    - 'lib/cli.rb'
84 84
 
85 85
 Style/ClassAndModuleChildren:
86 86
   Enabled: false

+ 186
- 83
AUTHORS.md View File

@@ -6,8 +6,8 @@ and provided thanks to the work of the following contributors:
6 6
 
7 7
 * [Gargron](https://github.com/Gargron)
8 8
 * [ykzts](https://github.com/ykzts)
9
-* [akihikodaki](https://github.com/akihikodaki)
10 9
 * [ThibG](https://github.com/ThibG)
10
+* [akihikodaki](https://github.com/akihikodaki)
11 11
 * [mjankowski](https://github.com/mjankowski)
12 12
 * [dependabot[bot]](https://github.com/apps/dependabot)
13 13
 * [unarist](https://github.com/unarist)
@@ -27,14 +27,14 @@ and provided thanks to the work of the following contributors:
27 27
 * [blackle](https://github.com/blackle)
28 28
 * [Quent-in](https://github.com/Quent-in)
29 29
 * [JantsoP](https://github.com/JantsoP)
30
-* [mabkenar](https://github.com/mabkenar)
31 30
 * [Kjwon15](https://github.com/Kjwon15)
31
+* [mabkenar](https://github.com/mabkenar)
32 32
 * [nullkal](https://github.com/nullkal)
33 33
 * [yookoala](https://github.com/yookoala)
34 34
 * [shuheiktgw](https://github.com/shuheiktgw)
35 35
 * [ashfurrow](https://github.com/ashfurrow)
36
-* [Quenty31](https://github.com/Quenty31)
37 36
 * [zunda](https://github.com/zunda)
37
+* [Quenty31](https://github.com/Quenty31)
38 38
 * [eramdam](https://github.com/eramdam)
39 39
 * [takayamaki](https://github.com/takayamaki)
40 40
 * [masarakki](https://github.com/masarakki)
@@ -45,8 +45,8 @@ and provided thanks to the work of the following contributors:
45 45
 * [stephenburgess8](https://github.com/stephenburgess8)
46 46
 * [Wonderfall](https://github.com/Wonderfall)
47 47
 * [matteoaquila](https://github.com/matteoaquila)
48
-* [rkarabut](https://github.com/rkarabut)
49 48
 * [yukimochi](https://github.com/yukimochi)
49
+* [rkarabut](https://github.com/rkarabut)
50 50
 * [Artoria2e5](https://github.com/Artoria2e5)
51 51
 * [nightpool](https://github.com/nightpool)
52 52
 * [marrus-sh](https://github.com/marrus-sh)
@@ -64,11 +64,14 @@ and provided thanks to the work of the following contributors:
64 64
 * [MaciekBaron](https://github.com/MaciekBaron)
65 65
 * [MitarashiDango](mailto:mitarashidango@users.noreply.github.com)
66 66
 * [beatrix-bitrot](https://github.com/beatrix-bitrot)
67
+* [Aditoo17](https://github.com/Aditoo17)
67 68
 * [adbelle](https://github.com/adbelle)
68 69
 * [evanminto](https://github.com/evanminto)
69 70
 * [MightyPork](https://github.com/MightyPork)
70 71
 * [yhirano55](https://github.com/yhirano55)
72
+* [rinsuki](https://github.com/rinsuki)
71 73
 * [camponez](https://github.com/camponez)
74
+* [hinaloe](https://github.com/hinaloe)
72 75
 * [SerCom-KC](https://github.com/SerCom-KC)
73 76
 * [aschmitz](https://github.com/aschmitz)
74 77
 * [devkral](https://github.com/devkral)
@@ -81,10 +84,8 @@ and provided thanks to the work of the following contributors:
81 84
 * [lindwurm](https://github.com/lindwurm)
82 85
 * [victorhck](mailto:victorhck@geeko.site)
83 86
 * [voidsatisfaction](https://github.com/voidsatisfaction)
84
-* [rinsuki](https://github.com/rinsuki)
85 87
 * [hikari-no-yume](https://github.com/hikari-no-yume)
86 88
 * [angristan](https://github.com/angristan)
87
-* [hinaloe](https://github.com/hinaloe)
88 89
 * [seefood](https://github.com/seefood)
89 90
 * [jackjennings](https://github.com/jackjennings)
90 91
 * [spla](mailto:spla@mastodont.cat)
@@ -102,9 +103,10 @@ and provided thanks to the work of the following contributors:
102 103
 * [victorhck](https://github.com/victorhck)
103 104
 * [kedamaDQ](https://github.com/kedamaDQ)
104 105
 * [puckipedia](https://github.com/puckipedia)
106
+* [trwnh](https://github.com/trwnh)
105 107
 * [fvh-P](https://github.com/fvh-P)
106
-* [contraexemplo](https://github.com/contraexemplo)
107
-* [Aditoo17](https://github.com/Aditoo17)
108
+* [Anna e só](mailto:contraexemplos@gmail.com)
109
+* [BenLubar](https://github.com/BenLubar)
108 110
 * [kazu9su](https://github.com/kazu9su)
109 111
 * [Komic](https://github.com/Komic)
110 112
 * [lmorchard](https://github.com/lmorchard)
@@ -117,7 +119,6 @@ and provided thanks to the work of the following contributors:
117 119
 * [goofy-bz](mailto:goofy@babelzilla.org)
118 120
 * [kadiix](https://github.com/kadiix)
119 121
 * [kodacs](https://github.com/kodacs)
120
-* [trwnh](https://github.com/trwnh)
121 122
 * [JMendyk](https://github.com/JMendyk)
122 123
 * [KScl](https://github.com/KScl)
123 124
 * [sterdev](https://github.com/sterdev)
@@ -133,6 +134,7 @@ and provided thanks to the work of the following contributors:
133 134
 * [Reverite](https://github.com/Reverite)
134 135
 * [JohnD28](https://github.com/JohnD28)
135 136
 * [znz](https://github.com/znz)
137
+* [marek-lach](https://github.com/marek-lach)
136 138
 * [Naouak](https://github.com/Naouak)
137 139
 * [pawelngei](https://github.com/pawelngei)
138 140
 * [rtucker](https://github.com/rtucker)
@@ -150,7 +152,6 @@ and provided thanks to the work of the following contributors:
150 152
 * [178inaba](https://github.com/178inaba)
151 153
 * [alyssais](https://github.com/alyssais)
152 154
 * [hiphref](https://github.com/hiphref)
153
-* [BenLubar](https://github.com/BenLubar)
154 155
 * [stalker314314](https://github.com/stalker314314)
155 156
 * [huertanix](https://github.com/huertanix)
156 157
 * [genesixx](https://github.com/genesixx)
@@ -161,16 +162,16 @@ and provided thanks to the work of the following contributors:
161 162
 * [kmichl](https://github.com/kmichl)
162 163
 * [Kurtis Rainbolt-Greene](mailto:me@kurtisrainboltgreene.name)
163 164
 * [saper](https://github.com/saper)
164
-* [marek-lach](https://github.com/marek-lach)
165 165
 * [nevillepark](https://github.com/nevillepark)
166 166
 * [ornithocoder](https://github.com/ornithocoder)
167 167
 * [pierreozoux](https://github.com/pierreozoux)
168 168
 * [qguv](https://github.com/qguv)
169 169
 * [Ram Lmn](mailto:ramlmn@users.noreply.github.com)
170
+* [sascha-sl](https://github.com/sascha-sl)
170 171
 * [harukasan](https://github.com/harukasan)
171 172
 * [stamak](https://github.com/stamak)
172 173
 * [Technowix](mailto:technowix@users.noreply.github.com)
173
-* [Eychics](https://github.com/Eychics)
174
+* [Zoeille](https://github.com/Zoeille)
174 175
 * [Thor Harald Johansen](mailto:thj@thj.no)
175 176
 * [0x70b1a5](https://github.com/0x70b1a5)
176 177
 * [gled-rs](https://github.com/gled-rs)
@@ -244,9 +245,9 @@ and provided thanks to the work of the following contributors:
244 245
 * [raymestalez](https://github.com/raymestalez)
245 246
 * [remram44](https://github.com/remram44)
246 247
 * [sts10](https://github.com/sts10)
247
-* [sascha-sl](https://github.com/sascha-sl)
248 248
 * [u1-liquid](https://github.com/u1-liquid)
249 249
 * [sim6](https://github.com/sim6)
250
+* [Sir-Boops](https://github.com/Sir-Boops)
250 251
 * [stemid](https://github.com/stemid)
251 252
 * [sumdog](https://github.com/sumdog)
252 253
 * [ThomasLeister](https://github.com/ThomasLeister)
@@ -316,8 +317,11 @@ and provided thanks to the work of the following contributors:
316 317
 * [Andreas Drop](mailto:andy@remline.de)
317 318
 * [andi1984](https://github.com/andi1984)
318 319
 * [schas002](https://github.com/schas002)
320
+* [contraexemplo](https://github.com/contraexemplo)
319 321
 * [abackstrom](https://github.com/abackstrom)
322
+* [armandfardeau](https://github.com/armandfardeau)
320 323
 * [jumbosushi](https://github.com/jumbosushi)
324
+* [aurelien-reeves](https://github.com/aurelien-reeves)
321 325
 * [ayumin](https://github.com/ayumin)
322 326
 * [BaptisteGelez](https://github.com/BaptisteGelez)
323 327
 * [bzg](https://github.com/bzg)
@@ -335,7 +339,7 @@ and provided thanks to the work of the following contributors:
335 339
 * [Motoma](https://github.com/Motoma)
336 340
 * [chriswk](https://github.com/chriswk)
337 341
 * [csu](https://github.com/csu)
338
-* [clarcharr](https://github.com/clarcharr)
342
+* [clarfon](https://github.com/clarfon)
339 343
 * [kklleemm](https://github.com/kklleemm)
340 344
 * [colindean](https://github.com/colindean)
341 345
 * [dachinat](https://github.com/dachinat)
@@ -358,6 +362,7 @@ and provided thanks to the work of the following contributors:
358 362
 * [eai04191](https://github.com/eai04191)
359 363
 * [d3vgru](https://github.com/d3vgru)
360 364
 * [Elizafox](https://github.com/Elizafox)
365
+* [enewhuis](https://github.com/enewhuis)
361 366
 * [ericblade](https://github.com/ericblade)
362 367
 * [mikoim](https://github.com/mikoim)
363 368
 * [espenronnevik](https://github.com/espenronnevik)
@@ -446,6 +451,7 @@ and provided thanks to the work of the following contributors:
446 451
 * [mouse-reeve](https://github.com/mouse-reeve)
447 452
 * [Mozinet-fr](https://github.com/Mozinet-fr)
448 453
 * [lae](https://github.com/lae)
454
+* [nosada](https://github.com/nosada)
449 455
 * [Nanamachi](https://github.com/Nanamachi)
450 456
 * [orinthe](https://github.com/orinthe)
451 457
 * [NecroTechno](https://github.com/NecroTechno)
@@ -462,10 +468,11 @@ and provided thanks to the work of the following contributors:
462 468
 * [noppa](https://github.com/noppa)
463 469
 * [Otakan951](https://github.com/Otakan951)
464 470
 * [fahy](https://github.com/fahy)
465
-* [PatrickRWells](https://github.com/PatrickRWells)
466
-* [Pangoraw](https://github.com/Pangoraw)
467
-* [peterkeen](https://github.com/peterkeen)
468
-* [pgate](https://github.com/pgate)
471
+* [PatrickRWells](mailto:32802366+patrickrwells@users.noreply.github.com)
472
+* [Paul](mailto:naydex.mc+github@gmail.com)
473
+* [Pete Keen](mailto:pete@petekeen.net)
474
+* [Pierre-Morgan Gate](mailto:pgate@users.noreply.github.com)
475
+* [Ratmir Karabut](mailto:rkarabut@sfmodern.ru)
469 476
 * [Reto Kromer](mailto:retokromer@users.noreply.github.com)
470 477
 * [Rey Tucker](mailto:git@reytucker.us)
471 478
 * [Rob Watson](mailto:rfwatson@users.noreply.github.com)
@@ -488,7 +495,6 @@ and provided thanks to the work of the following contributors:
488 495
 * [Sho Kusano](mailto:rosylilly@aduca.org)
489 496
 * [Shouko Yu](mailto:imshouko@gmail.com)
490 497
 * [Sina Mashek](mailto:sina@mashek.xyz)
491
-* [Sir-Boops](mailto:admin@boops.me)
492 498
 * [Soshi Kato](mailto:mail@sossii.com)
493 499
 * [Spanky](mailto:2788886+spankyworks@users.noreply.github.com)
494 500
 * [Stanislas](mailto:angristan@pm.me)
@@ -555,12 +561,14 @@ and provided thanks to the work of the following contributors:
555 561
 * [karlyeurl](mailto:karl.yeurl@gmail.com)
556 562
 * [kedama](mailto:32974885+kedamadq@users.noreply.github.com)
557 563
 * [kodai](mailto:shirafuta.kodai@gmail.com)
564
+* [koyu](mailto:me@koyu.space)
558 565
 * [kuro5hin](mailto:rusty@kuro5hin.org)
559 566
 * [luzpaz](mailto:luzpaz@users.noreply.github.com)
560 567
 * [maxypy](mailto:maxime@mpigou.fr)
561 568
 * [mhe](mailto:mail@marcus-herrmann.com)
562 569
 * [mike castleman](mailto:m@mlcastle.net)
563 570
 * [mimikun](mailto:dzdzble_effort_311@outlook.jp)
571
+* [mohemohe](mailto:mohemohe@users.noreply.github.com)
564 572
 * [mshrtkch](mailto:mshrtkch@users.noreply.github.com)
565 573
 * [muan](mailto:muan@github.com)
566 574
 * [namelessGonbai](mailto:43787036+namelessgonbai@users.noreply.github.com)
@@ -599,243 +607,338 @@ This document is provided for informational purposes only. Since it is only upda
599 607
 
600 608
 Following people have contributed to translation of Mastodon:
601 609
 
610
+- **Albanian**
611
+  - Besnik Bleta
612
+  - Aditoo
602 613
 - **Arabic**
603 614
   - ButterflyOfFire
615
+  - Aditoo
616
+  - Amrz0
604 617
 - **Asturian**
605 618
   - ButterflyOfFire
606 619
   - Enol P.
620
+  - Aditoo
607 621
 - **Basque**
622
+  - Osoitz
623
+  - Aditoo
608 624
   - Aitzol
609 625
   - ButterflyOfFire
610
-  - Gorka Azkarate
611
-  - Osoitz
612 626
   - Peru Iparragirre
627
+  - Gorka Azkarate
628
+- **Bengali**
629
+  - dxwc
613 630
 - **Bulgarian**
614 631
   - ButterflyOfFire
632
+  - Aditoo
615 633
 - **Catalan**
634
+  - spla
635
+  - Aditoo
616 636
   - ButterflyOfFire
617 637
   - Joan Montané
618 638
   - Jose Luis
619
-  - spla
620 639
 - **Chinese (Hong Kong)**
621 640
   - ButterflyOfFire
622 641
   - Luzi Leung
642
+  - Aditoo
623 643
 - **Chinese (Simplified)**
624 644
   - Allen Zhong
625 645
   - ButterflyOfFire
626 646
   - SerCom_KC
647
+  - martialarts
648
+  - Kaitian Xie
649
+  - Aditoo
650
+  - pan93412
627 651
 - **Chinese (Traditional)**
652
+  - Aditoo
628 653
   - ButterflyOfFire
629 654
   - James58899
630
-  - Jeff Huang
655
+  - pan93412
631 656
   - S1ttidoe477
632 657
   - SHA265
658
+  - Jeff Huang
633 659
 - **Corsican**
634 660
   - Alix D. R.
661
+  - Aditoo
635 662
   - ButterflyOfFire
636 663
 - **Croatian**
637 664
   - ButterflyOfFire
665
+  - Aditoo
638 666
 - **Czech**
639
-  - ButterflyOfFire
640
-  - Lorem Ipsum
667
+  - Aditoo
641 668
   - Marek Ľach
642
-- **Danish**
643 669
   - ButterflyOfFire
670
+- **Danish**
671
+  - Einhjeriar
644 672
   - Rasmus Sæderup
673
+  - Aditoo
674
+  - ButterflyOfFire
645 675
 - **Dutch**
676
+  - Albakham
646 677
   - ButterflyOfFire
647
-  - Jelv
648 678
   - jeroenpraat
649 679
   - rscmbbng
680
+  - Aditoo
681
+  - Jelv
650 682
 - **English**
651 683
   - ButterflyOfFire
652 684
   - Renato "Lond" Cerqueira
685
+- **English (United Kingdom)**
686
+  - Albakham
653 687
 - **Esperanto**
688
+  - Aditoo
654 689
   - ButterflyOfFire
690
+  - Becci Cat
655 691
   - Jeong Arm
656
-  - Martin Bodin
657 692
   - Mélanie Chauvel
658 693
   - Vanege
694
+  - Martin Bodin
659 695
   - tuxayo/Victor Grousset
660 696
 - **Finnish**
661 697
   - ButterflyOfFire
662
-  - Jonne Arjoranta
663
-  - S Heija
698
+  - Mikko Poussu
664 699
   - Taru Luojola
700
+  - S Heija
701
+  - Aditoo
702
+  - Jonne Arjoranta
665 703
 - **French**
666
-  - Alda Marteau-Hardi
704
+  - Albakham
667 705
   - Alix D. R.
668
-  - Baptiste Jonglez
669 706
   - ButterflyOfFire
670
-  - Franck Paul
671
-  - Jean-Baptiste Holcroft
672
-  - Jonathan Chan
673
-  - Letiteuf55
674
-  - Martin Bodin
707
+  - codl
708
+  - Leia
709
+  - Alda Marteau-Hardi
675 710
   - Mélanie Chauvel
676
-  - Olivier Humbert
677 711
   - Paul Marques Mota
678
-  - Sylvhem
712
+  - azenet
713
+  - Olivier Humbert
714
+  - Aditoo
715
+  - Jonathan Chan
716
+  - Letiteuf55
717
+  - Baptiste Jonglez
718
+  - goofy-mdn
719
+  - Jean-Baptiste Holcroft
679 720
   - Technowix
680
-  - Thibaut Girka
721
+  - Martin Bodin
681 722
   - Théodore
682
-  - azenet
683
-  - codl
723
+  - Thibaut Girka
724
+  - Franck Paul
725
+  - Sylvhem
684 726
 - **Galician**
685 727
   - ButterflyOfFire
686 728
   - Xose M.
729
+  - Aditoo
687 730
   - manequim
688 731
 - **Georgian**
689 732
   - ButterflyOfFire
733
+  - Aditoo
690 734
 - **German**
691
-  - Benedikt Geißler
735
+  - Aditoo
692 736
   - ButterflyOfFire
693 737
   - Daniel
694
-  - Eugen Rochko
695
-  - Koyu Berteon
696
-  - Patrick Figel
697
-  - Weblate Admin
698 738
   - averageunicorn
699
-  - ePirat
700
-  - koyu
739
+  - Koyu Berteon
701 740
   - larsreineke
741
+  - koyu
742
+  - Austin Jones
702 743
   - lilo
744
+  - Benedikt Geißler
745
+  - ePirat
746
+  - Eugen Rochko
747
+  - Weblate Admin
748
+  - Patrick Figel
703 749
 - **Greek**
750
+  - Dimitris Maroulidis
704 751
   - Antonis
752
+  - Aditoo
705 753
   - ButterflyOfFire
706
-  - Dimitris Maroulidis
707 754
   - Konstantinos Grevenitis
708 755
 - **Hebrew**
709 756
   - ButterflyOfFire
757
+  - Aditoo
710 758
   - Ira
711 759
   - Yaron Shahrabani
712 760
 - **Hungarian**
713
-  - Adam Paszternak
714 761
   - ButterflyOfFire
762
+  - Adam Paszternak
763
+  - Aditoo
715 764
   - Tibike Miklós
716 765
 - **Ido**
717 766
   - ButterflyOfFire
767
+  - Aditoo
718 768
 - **Indonesian**
719
-  - Alfiana Sibuea
769
+  - afachri
720 770
   - ButterflyOfFire
721 771
   - Dito Kurnia Pratama
722 772
   - Eirworks
723
-  - afachri
773
+  - Aditoo
774
+  - Alfiana Sibuea
724 775
   - se7entime
776
+- **Irish**
777
+  - Albakham
778
+  - Kevin Houlihan
725 779
 - **Italian**
726 780
   - Alessandro Levati
781
+  - Albakham
727 782
   - ButterflyOfFire
783
+  - Marcin Mikołajczak
784
+  - Aditoo
728 785
   - Giuseppe Pignataro
729 786
   - Stefano
730 787
 - **Japanese**
731
-  - ButterflyOfFire
732
-  - Kumasun Morino
733
-  - Yamagishi Kazutoshi
788
+  - Hinaloe
789
+  - 小鳥遊まりあ
734 790
   - mayaeh
735 791
   - osapon
736
-  - unarist
737
-  - 小鳥遊まりあ
738 792
   - 森の子リスのミーコの大冒険
739
-- **Korean**
793
+  - Kumasun Morino
794
+  - Yamagishi Kazutoshi
795
+  - Aditoo
740 796
   - ButterflyOfFire
741 797
   - Jeong Arm
798
+  - unarist
799
+- **Kazakh**
800
+  - arshat
801
+  - Aditoo
802
+- **Korean**
803
+  - Aditoo
804
+  - Jeong Arm
805
+  - ButterflyOfFire
742 806
   - Minori Hiraoka
743 807
   - Yamagishi Kazutoshi
808
+- **Lithuanian**
809
+  - Sarunas Medeikis
744 810
 - **Malay**
745
-  - ButterflyOfFire
746 811
   - Muhammad Nur Hidayat (MNH48)
812
+  - Aditoo
813
+  - ButterflyOfFire
747 814
 - **Norwegian (old code)**
748 815
   - ButterflyOfFire
749 816
   - Espen Rønnevik
817
+  - Aditoo
750 818
   - Tale
751 819
 - **Occitan**
820
+  - Aditoo
752 821
   - ButterflyOfFire
753
-  - Maxenç
754 822
   - Quenti2
755 823
   - Quentí
824
+  - Maxenç
756 825
 - **Persian**
757
-  - ButterflyOfFire
758 826
   - Masoud Abkenar
827
+  - Aditoo
828
+  - ButterflyOfFire
759 829
 - **Polish**
830
+  - Aditoo
831
+  - Albakham
760 832
   - ButterflyOfFire
761
-  - Jakub Mendyk
833
+  - Stasiek Michalski
762 834
   - Marcin Mikołajczak
835
+  - Jakub Mendyk
763 836
   - Marek Ľach
764
-  - Stasiek Michalski
765 837
   - krkk
766 838
 - **Portuguese**
839
+  - Albakham
840
+  - João Pinheiro
841
+  - manequim
842
+  - Aditoo
767 843
   - ButterflyOfFire
768 844
   - Hugo Gameiro
769
-  - manequim
770 845
 - **Portuguese (Brazil)**
771
-  - André Andrade
846
+  - Aditoo
847
+  - Albakham
772 848
   - Anna e só
773
-  - ButterflyOfFire
774 849
   - Renato "Lond" Cerqueira
775
-- **Romanian**
850
+  - André Andrade
776 851
   - ButterflyOfFire
852
+- **Romanian**
777 853
   - adrianbblk
854
+  - ButterflyOfFire
855
+  - Aditoo
778 856
 - **Russian**
779
-  - Andrew Zyabin
857
+  - Albakham
780 858
   - ButterflyOfFire
781 859
   - Evgeny Petrov
860
+  - Aditoo
861
+  - Павел Гастелло
862
+  - Andrew Zyabin
782 863
   - Yaron Shahrabani
783 864
 - **Serbian**
784 865
   - Branko Kokanovic
785 866
   - Burekz Finezt
867
+  - Aditoo
786 868
   - ButterflyOfFire
787 869
 - **Serbian (latin)**
788 870
   - ButterflyOfFire
871
+  - Aditoo
789 872
 - **Slovak**
873
+  - Aditoo
790 874
   - ButterflyOfFire
791 875
   - Ivan Pleva
792
-  - Lorem Ipsum
793 876
   - Marek Ľach
794 877
   - Peter
795 878
 - **Slovenian**
796
-  - ButterflyOfFire
797 879
   - Kristijan Tkalec
880
+  - Aditoo
881
+  - ButterflyOfFire
798 882
 - **Spanish**
799
-  - Angeles Broullón
800
-  - Antón López
883
+  - Albakham
801 884
   - ButterflyOfFire
802 885
   - Carlos Mondragon
886
+  - Antón López
887
+  - Max Winkler
888
+  - Pablo de la Concepción Sanz
889
+  - Sergio Soriano
890
+  - Angeles Broullón
891
+  - Lothar Wolf
892
+  - Aditoo
803 893
   - David Charte
804 894
   - Emmanuel
805
-  - Lothar Wolf
806
-  - Pablo de la Concepción Sanz
807 895
 - **Swedish**
808 896
   - ButterflyOfFire
809
-  - Elias Mårtenson
810 897
   - Isak Holmström
811 898
   - Shellkr
899
+  - Aditoo
900
+  - Elias Mårtenson
812 901
   - Stefan Midjich
813 902
   - Tim Stahel
903
+  - Jonas Hultén
814 904
 - **Telugu**
905
+  - avndp
906
+  - Ranjith Tellakula
907
+  - Aditoo
815 908
   - ButterflyOfFire
816 909
   - Joseph Nuthalapati
817
-  - Ranjith Tellakula
818
-  - avndp
819 910
 - **Thai**
820 911
   - ButterflyOfFire
912
+  - parnikkapore
913
+  - Thai Localization
914
+  - Aditoo
821 915
 - **Turkish**
916
+  - Ali Demirtas
822 917
   - ButterflyOfFire
918
+  - Aditoo
823 919
 - **Ukrainian**
920
+  - alexcleac
824 921
   - ButterflyOfFire
922
+  - Aditoo
825 923
   - Ivan Verchenko
826
-  - alexcleac
827 924
 - **Welsh**
828
-  - ButterflyOfFire
925
+  - carl morris
829 926
   - Jaz-Michael King
830
-  - Kevin Beynon
831 927
   - Owain Rhys Lewis
832
-  - Renato "Lond" Cerqueira
833 928
   - Rhoslyn Prys
834
-  - carl morris
929
+  - Aditoo
930
+  - ButterflyOfFire
931
+  - Renato "Lond" Cerqueira
932
+  - Albakham
933
+  - Kevin Beynon
835 934
 - **Armenian**
935
+  - Aditoo
836 936
   - ButterflyOfFire
837 937
 - **Latvian**
938
+  - Aditoo
838 939
   - ButterflyOfFire
940
+  - Maigonis
839 941
 - **Tamil**
942
+  - Aditoo
840 943
   - ButterflyOfFire
841 944
   - Prasanna Venkadesh

+ 83
- 0
CHANGELOG.md View File

@@ -3,6 +3,89 @@ Changelog
3 3
 
4 4
 All notable changes to this project will be documented in this file.
5 5
 
6
+## [2.8.0] - 2019-04-10
7
+### Added
8
+
9
+- Add polls ([Gargron](https://github.com/tootsuite/mastodon/pull/10111), [ThibG](https://github.com/tootsuite/mastodon/pull/10155), [Gargron](https://github.com/tootsuite/mastodon/pull/10184), [ThibG](https://github.com/tootsuite/mastodon/pull/10196), [Gargron](https://github.com/tootsuite/mastodon/pull/10248), [ThibG](https://github.com/tootsuite/mastodon/pull/10255), [ThibG](https://github.com/tootsuite/mastodon/pull/10322), [Gargron](https://github.com/tootsuite/mastodon/pull/10138), [Gargron](https://github.com/tootsuite/mastodon/pull/10139), [Gargron](https://github.com/tootsuite/mastodon/pull/10144), [Gargron](https://github.com/tootsuite/mastodon/pull/10145),[Gargron](https://github.com/tootsuite/mastodon/pull/10146), [Gargron](https://github.com/tootsuite/mastodon/pull/10148), [Gargron](https://github.com/tootsuite/mastodon/pull/10151), [ThibG](https://github.com/tootsuite/mastodon/pull/10150), [Gargron](https://github.com/tootsuite/mastodon/pull/10168), [Gargron](https://github.com/tootsuite/mastodon/pull/10165), [Gargron](https://github.com/tootsuite/mastodon/pull/10172), [Gargron](https://github.com/tootsuite/mastodon/pull/10170), [Gargron](https://github.com/tootsuite/mastodon/pull/10171), [Gargron](https://github.com/tootsuite/mastodon/pull/10186), [Gargron](https://github.com/tootsuite/mastodon/pull/10189), [ThibG](https://github.com/tootsuite/mastodon/pull/10200), [rinsuki](https://github.com/tootsuite/mastodon/pull/10203), [Gargron](https://github.com/tootsuite/mastodon/pull/10213), [Gargron](https://github.com/tootsuite/mastodon/pull/10246), [Gargron](https://github.com/tootsuite/mastodon/pull/10265), [Gargron](https://github.com/tootsuite/mastodon/pull/10261), [ThibG](https://github.com/tootsuite/mastodon/pull/10333), [Gargron](https://github.com/tootsuite/mastodon/pull/10352), [ThibG](https://github.com/tootsuite/mastodon/pull/10140), [ThibG](https://github.com/tootsuite/mastodon/pull/10142), [ThibG](https://github.com/tootsuite/mastodon/pull/10141), [ThibG](https://github.com/tootsuite/mastodon/pull/10162), [ThibG](https://github.com/tootsuite/mastodon/pull/10161), [ThibG](https://github.com/tootsuite/mastodon/pull/10158), [ThibG](https://github.com/tootsuite/mastodon/pull/10156), [ThibG](https://github.com/tootsuite/mastodon/pull/10160), [Gargron](https://github.com/tootsuite/mastodon/pull/10185), [Gargron](https://github.com/tootsuite/mastodon/pull/10188), [ThibG](https://github.com/tootsuite/mastodon/pull/10195), [ThibG](https://github.com/tootsuite/mastodon/pull/10208), [Gargron](https://github.com/tootsuite/mastodon/pull/10187), [ThibG](https://github.com/tootsuite/mastodon/pull/10214), [ThibG](https://github.com/tootsuite/mastodon/pull/10209))
10
+- Add follows & followers managing UI ([Gargron](https://github.com/tootsuite/mastodon/pull/10268), [Gargron](https://github.com/tootsuite/mastodon/pull/10308), [Gargron](https://github.com/tootsuite/mastodon/pull/10404), [Gargron](https://github.com/tootsuite/mastodon/pull/10293))
11
+- Add identity proof integration with Keybase ([Gargron](https://github.com/tootsuite/mastodon/pull/10297), [xgess](https://github.com/tootsuite/mastodon/pull/10375), [Gargron](https://github.com/tootsuite/mastodon/pull/10338), [Gargron](https://github.com/tootsuite/mastodon/pull/10350), [Gargron](https://github.com/tootsuite/mastodon/pull/10414))
12
+- Add option to overwrite imported data instead of merging ([Gargron](https://github.com/tootsuite/mastodon/pull/9962))
13
+- Add featured hashtags to profiles ([Gargron](https://github.com/tootsuite/mastodon/pull/9755), [Gargron](https://github.com/tootsuite/mastodon/pull/10167), [Gargron](https://github.com/tootsuite/mastodon/pull/10249), [ThibG](https://github.com/tootsuite/mastodon/pull/10034))
14
+- Add admission-based registrations mode ([Gargron](https://github.com/tootsuite/mastodon/pull/10250), [ThibG](https://github.com/tootsuite/mastodon/pull/10269), [Gargron](https://github.com/tootsuite/mastodon/pull/10264), [ThibG](https://github.com/tootsuite/mastodon/pull/10321), [Gargron](https://github.com/tootsuite/mastodon/pull/10349), [Gargron](https://github.com/tootsuite/mastodon/pull/10469))
15
+- Add support for WebP uploads ([acid-chicken](https://github.com/tootsuite/mastodon/pull/9879))
16
+- Add "copy link" item to status action bars in web UI ([Gargron](https://github.com/tootsuite/mastodon/pull/9983))
17
+- Add list title editing in web UI ([ThibG](https://github.com/tootsuite/mastodon/pull/9748))
18
+- Add a "Block & Report" button to the block confirmation dialog in web UI ([ThibG](https://github.com/tootsuite/mastodon/pull/10360))
19
+- Add disappointed elephant when the page crashes in web UI ([Gargron](https://github.com/tootsuite/mastodon/pull/10275))
20
+- Add ability to upload multiple files at once in web UI ([tmm576](https://github.com/tootsuite/mastodon/pull/9856))
21
+- Add indication when you are not allowed to follow an account in web UI ([Gargron](https://github.com/tootsuite/mastodon/pull/10420), [Gargron](https://github.com/tootsuite/mastodon/pull/10491))
22
+- Add validations to admin settings to catch common mistakes ([Gargron](https://github.com/tootsuite/mastodon/pull/10348), [ThibG](https://github.com/tootsuite/mastodon/pull/10354))
23
+- Add `type`, `limit`, `offset`, `min_id`, `max_id`, `account_id` to search API ([Gargron](https://github.com/tootsuite/mastodon/pull/10091))
24
+- Add a preferences API so apps can share basic behaviours ([Gargron](https://github.com/tootsuite/mastodon/pull/10109))
25
+- Add `visibility` param to reblog REST API ([Gargron](https://github.com/tootsuite/mastodon/pull/9851), [ThibG](https://github.com/tootsuite/mastodon/pull/10302))
26
+- Add `allowfullscreen` attribute to OEmbed iframe ([rinsuki](https://github.com/tootsuite/mastodon/pull/10370))
27
+- Add `blocked_by` relationship to the REST API ([Gargron](https://github.com/tootsuite/mastodon/pull/10373))
28
+- Add `tootctl statuses remove` to sweep unreferenced statuses ([Gargron](https://github.com/tootsuite/mastodon/pull/10063))
29
+- Add `tootctl search deploy` to avoid ugly rake task syntax ([Gargron](https://github.com/tootsuite/mastodon/pull/10403))
30
+- Add `tootctl self-destruct` to shut down server gracefully ([Gargron](https://github.com/tootsuite/mastodon/pull/10367))
31
+- Add option to hide application used to toot ([ThibG](https://github.com/tootsuite/mastodon/pull/9897), [rinsuki](https://github.com/tootsuite/mastodon/pull/9994), [hinaloe](https://github.com/tootsuite/mastodon/pull/10086))
32
+- Add `DB_SSLMODE` configuration variable ([sascha-sl](https://github.com/tootsuite/mastodon/pull/10210))
33
+- Add click-to-copy UI to invites page ([Gargron](https://github.com/tootsuite/mastodon/pull/10259))
34
+- Add self-replies fetching ([ThibG](https://github.com/tootsuite/mastodon/pull/10106), [ThibG](https://github.com/tootsuite/mastodon/pull/10128), [ThibG](https://github.com/tootsuite/mastodon/pull/10175), [ThibG](https://github.com/tootsuite/mastodon/pull/10201))
35
+- Add rate limit for media proxy requests ([Gargron](https://github.com/tootsuite/mastodon/pull/10490))
36
+- Add `tootctl emoji purge` ([Gargron](https://github.com/tootsuite/mastodon/pull/10481))
37
+- Add `tootctl accounts approve` ([Gargron](https://github.com/tootsuite/mastodon/pull/10480))
38
+- Add `tootctl accounts reset-relationships` ([noellabo](https://github.com/tootsuite/mastodon/pull/10483))
39
+
40
+### Changed
41
+
42
+- Change design of landing page ([Gargron](https://github.com/tootsuite/mastodon/pull/10232), [Gargron](https://github.com/tootsuite/mastodon/pull/10260), [ThibG](https://github.com/tootsuite/mastodon/pull/10284), [ThibG](https://github.com/tootsuite/mastodon/pull/10291), [koyuawsmbrtn](https://github.com/tootsuite/mastodon/pull/10356), [Gargron](https://github.com/tootsuite/mastodon/pull/10245))
43
+- Change design of profile column in web UI ([Gargron](https://github.com/tootsuite/mastodon/pull/10337), [Aditoo17](https://github.com/tootsuite/mastodon/pull/10387), [ThibG](https://github.com/tootsuite/mastodon/pull/10390), [mayaeh](https://github.com/tootsuite/mastodon/pull/10379), [ThibG](https://github.com/tootsuite/mastodon/pull/10411))
44
+- Change language detector threshold from 140 characters to 4 words ([Gargron](https://github.com/tootsuite/mastodon/pull/10376))
45
+- Change language detector to always kick in for non-latin alphabets ([Gargron](https://github.com/tootsuite/mastodon/pull/10276))
46
+- Change icons of features on admin dashboard ([Gargron](https://github.com/tootsuite/mastodon/pull/10366))
47
+- Change DNS timeouts from 1s to 5s ([ThibG](https://github.com/tootsuite/mastodon/pull/10238))
48
+- Change Docker image to use Ubuntu with jemalloc ([Sir-Boops](https://github.com/tootsuite/mastodon/pull/10100), [BenLubar](https://github.com/tootsuite/mastodon/pull/10212))
49
+- Change public pages to be cacheable by proxies ([BenLubar](https://github.com/tootsuite/mastodon/pull/9059))
50
+- Change the 410 gone response for suspended accounts to be cacheable by proxies ([ThibG](https://github.com/tootsuite/mastodon/pull/10339))
51
+- Change web UI to not not empty timeline of blocked users on block ([ThibG](https://github.com/tootsuite/mastodon/pull/10359))
52
+- Change JSON serializer to remove unused `@context` values ([Gargron](https://github.com/tootsuite/mastodon/pull/10378))
53
+- Change GIFV file size limit to be the same as for other videos ([rinsuki](https://github.com/tootsuite/mastodon/pull/9924))
54
+- Change Webpack to not use @babel/preset-env to compile node_modules ([ykzts](https://github.com/tootsuite/mastodon/pull/10289))
55
+- Change web UI to use new Web Share Target API ([gol-cha](https://github.com/tootsuite/mastodon/pull/9963))
56
+- Change ActivityPub reports to have persistent URIs ([ThibG](https://github.com/tootsuite/mastodon/pull/10303))
57
+- Change `tootctl accounts cull --dry-run` to list accounts that would be deleted ([BenLubar](https://github.com/tootsuite/mastodon/pull/10460))
58
+- Change format of CSV exports of follows and mutes to include extra settings ([ThibG](https://github.com/tootsuite/mastodon/pull/10495), [ThibG](https://github.com/tootsuite/mastodon/pull/10335))
59
+- Change ActivityPub collections to be cacheable by proxies ([ThibG](https://github.com/tootsuite/mastodon/pull/10467))
60
+- Change REST API and public profiles to not return follows/followers for users that have blocked you ([Gargron](https://github.com/tootsuite/mastodon/pull/10491))
61
+- Change the groupings of menu items in settings navigation ([Gargron](https://github.com/tootsuite/mastodon/pull/10533))
62
+
63
+### Removed
64
+
65
+- Remove zopfli compression to speed up Webpack from 6min to 1min ([nolanlawson](https://github.com/tootsuite/mastodon/pull/10288))
66
+- Remove stats.json generation to speed up Webpack ([nolanlawson](https://github.com/tootsuite/mastodon/pull/10290))
67
+
68
+### Fixed
69
+
70
+- Fix public timelines being broken by new toots when they are not mounted in web UI ([Gargron](https://github.com/tootsuite/mastodon/pull/10131))
71
+- Fix quick filter settings not being saved when selecting a different filter in web UI ([ThibG](https://github.com/tootsuite/mastodon/pull/10296))
72
+- Fix remote interaction dialogs being indexed by search engines ([Gargron](https://github.com/tootsuite/mastodon/pull/10240))
73
+- Fix maxed-out invites not showing up as expired in UI ([Gargron](https://github.com/tootsuite/mastodon/pull/10274))
74
+- Fix scrollbar styles on compose textarea ([Gargron](https://github.com/tootsuite/mastodon/pull/10292))
75
+- Fix timeline merge workers being queued for remote users ([Gargron](https://github.com/tootsuite/mastodon/pull/10355))
76
+- Fix alternative relay support regression ([Gargron](https://github.com/tootsuite/mastodon/pull/10398))
77
+- Fix trying to fetch keys of unknown accounts on a self-delete from them ([ThibG](https://github.com/tootsuite/mastodon/pull/10326))
78
+- Fix CAS `:service_validate_url` option ([enewhuis](https://github.com/tootsuite/mastodon/pull/10328))
79
+- Fix race conditions when creating backups ([ThibG](https://github.com/tootsuite/mastodon/pull/10234))
80
+- Fix whitespace not being stripped out of username before validation ([aurelien-reeves](https://github.com/tootsuite/mastodon/pull/10239))
81
+- Fix n+1 query when deleting status ([Gargron](https://github.com/tootsuite/mastodon/pull/10247))
82
+- Fix exiting follows not being rejected when suspending a remote account ([ThibG](https://github.com/tootsuite/mastodon/pull/10230))
83
+- Fix the underlying button element in a disabled icon button not being disabled ([ThibG](https://github.com/tootsuite/mastodon/pull/10194))
84
+- Fix race condition when streaming out deleted statuses ([ThibG](https://github.com/tootsuite/mastodon/pull/10280))
85
+- Fix performance of admin federation UI by caching account counts ([Gargron](https://github.com/tootsuite/mastodon/pull/10374))
86
+- Fix JS error on pages that don't define a CSRF token ([hinaloe](https://github.com/tootsuite/mastodon/pull/10383))
87
+- Fix `tootctl accounts cull` sometimes removing accounts that are temporarily unreachable ([BenLubar](https://github.com/tootsuite/mastodon/pull/10460))
88
+
6 89
 ## [2.7.4] - 2019-03-05
7 90
 ### Fixed
8 91
 

+ 123
- 85
Dockerfile View File

@@ -1,90 +1,128 @@
1
-FROM node:8.15-alpine as node
2
-FROM ruby:2.6-alpine3.8
3
-
4
-LABEL maintainer="https://github.com/tootsuite/mastodon" \
5
-      description="Your self-hosted, globally interconnected microblogging community"
6
-
1
+FROM ubuntu:18.04 as build-dep
2
+
3
+# Use bash for the shell
4
+SHELL ["bash", "-c"]
5
+
6
+# Install Node
7
+ENV NODE_VER="8.15.0"
8
+RUN	echo "Etc/UTC" > /etc/localtime && \
9
+	apt update && \
10
+	apt -y dist-upgrade && \
11
+	apt -y install wget make gcc g++ python && \
12
+	cd ~ && \
13
+	wget https://nodejs.org/download/release/v$NODE_VER/node-v$NODE_VER.tar.gz && \
14
+	tar xf node-v$NODE_VER.tar.gz && \
15
+	cd node-v$NODE_VER && \
16
+	./configure --prefix=/opt/node && \
17
+	make -j$(nproc) > /dev/null && \
18
+	make install
19
+
20
+# Install jemalloc
21
+ENV JE_VER="5.1.0"
22
+RUN apt update && \
23
+	apt -y install autoconf && \
24
+	cd ~ && \
25
+	wget https://github.com/jemalloc/jemalloc/archive/$JE_VER.tar.gz && \
26
+	tar xf $JE_VER.tar.gz && \
27
+	cd jemalloc-$JE_VER && \
28
+	./autogen.sh && \
29
+	./configure --prefix=/opt/jemalloc && \
30
+	make -j$(nproc) > /dev/null && \
31
+	make install_bin install_include install_lib
32
+
33
+# Install ruby
34
+ENV RUBY_VER="2.6.1"
35
+ENV CPPFLAGS="-I/opt/jemalloc/include"
36
+ENV LDFLAGS="-L/opt/jemalloc/lib/"
37
+RUN apt update && \
38
+	apt -y install build-essential \
39
+		bison libyaml-dev libgdbm-dev libreadline-dev \
40
+		libncurses5-dev libffi-dev zlib1g-dev libssl-dev && \
41
+	cd ~ && \
42
+	wget https://cache.ruby-lang.org/pub/ruby/${RUBY_VER%.*}/ruby-$RUBY_VER.tar.gz && \
43
+	tar xf ruby-$RUBY_VER.tar.gz && \
44
+	cd ruby-$RUBY_VER && \
45
+	./configure --prefix=/opt/ruby \
46
+	  --with-jemalloc \
47
+	  --with-shared \
48
+	  --disable-install-doc && \
49
+	ln -s /opt/jemalloc/lib/* /usr/lib/ && \
50
+	make -j$(nproc) > /dev/null && \
51
+	make install
52
+
53
+ENV PATH="${PATH}:/opt/ruby/bin:/opt/node/bin"
54
+
55
+RUN npm install -g yarn && \
56
+	gem install bundler && \
57
+	apt update && \
58
+	apt -y install git libicu-dev libidn11-dev \
59
+	libpq-dev libprotobuf-dev protobuf-compiler
60
+
61
+COPY Gemfile* package.json yarn.lock /opt/mastodon/
62
+
63
+RUN cd /opt/mastodon && \
64
+	bundle install -j$(nproc) --deployment --without development test && \
65
+	yarn install --pure-lockfile
66
+
67
+FROM ubuntu:18.04
68
+
69
+# Copy over all the langs needed for runtime
70
+COPY --from=build-dep /opt/node /opt/node
71
+COPY --from=build-dep /opt/ruby /opt/ruby
72
+COPY --from=build-dep /opt/jemalloc /opt/jemalloc
73
+
74
+# Add more PATHs to the PATH
75
+ENV PATH="${PATH}:/opt/ruby/bin:/opt/node/bin:/opt/mastodon/bin"
76
+
77
+# Create the mastodon user
7 78
 ARG UID=991
8 79
 ARG GID=991
9
-
10
-ENV PATH=/mastodon/bin:$PATH \
11
-    RAILS_SERVE_STATIC_FILES=true \
12
-    RAILS_ENV=production \
13
-    NODE_ENV=production
14
-
15
-ARG LIBICONV_VERSION=1.15
16
-ARG LIBICONV_DOWNLOAD_SHA256=ccf536620a45458d26ba83887a983b96827001e92a13847b45e4925cc8913178
17
-
18
-EXPOSE 3000 4000
19
-
20
-WORKDIR /mastodon
21
-
22
-COPY --from=node /usr/local/bin/node /usr/local/bin/node
23
-COPY --from=node /usr/local/lib/node_modules /usr/local/lib/node_modules
24
-COPY --from=node /usr/local/bin/npm /usr/local/bin/npm
25
-COPY --from=node /opt/yarn-* /opt/yarn
26
-
27
-RUN apk -U upgrade \
28
- && apk add -t build-dependencies \
29
-    build-base \
30
-    icu-dev \
31
-    libidn-dev \
32
-    libressl \
33
-    libtool \
34
-    libxml2-dev \
35
-    libxslt-dev \
36
-    postgresql-dev \
37
-    protobuf-dev \
38
-    python \
39
- && apk add \
40
-    ca-certificates \
41
-    ffmpeg \
42
-    file \
43
-    git \
44
-    icu-libs \
45
-    imagemagick \
46
-    libidn \
47
-    libpq \
48
-    libxml2 \
49
-    libxslt \
50
-    protobuf \
51
-    tini \
52
-    tzdata \
53
- && update-ca-certificates \
54
- && ln -s /opt/yarn/bin/yarn /usr/local/bin/yarn \
55
- && ln -s /opt/yarn/bin/yarnpkg /usr/local/bin/yarnpkg \
56
- && mkdir -p /tmp/src /opt \
57
- && wget -O libiconv.tar.gz "https://ftp.gnu.org/pub/gnu/libiconv/libiconv-$LIBICONV_VERSION.tar.gz" \
58
- && echo "$LIBICONV_DOWNLOAD_SHA256 *libiconv.tar.gz" | sha256sum -c - \
59
- && tar -xzf libiconv.tar.gz -C /tmp/src \
60
- && rm libiconv.tar.gz \
61
- && cd /tmp/src/libiconv-$LIBICONV_VERSION \
62
- && ./configure --prefix=/usr/local \
63
- && make -j$(getconf _NPROCESSORS_ONLN)\
64
- && make install \
65
- && libtool --finish /usr/local/lib \
66
- && cd /mastodon \
67
- && rm -rf /tmp/* /var/cache/apk/*
68
-
69
-COPY Gemfile Gemfile.lock package.json yarn.lock .yarnclean /mastodon/
70
-
71
-RUN bundle config build.nokogiri --use-system-libraries --with-iconv-lib=/usr/local/lib --with-iconv-include=/usr/local/include \
72
- && bundle install -j$(getconf _NPROCESSORS_ONLN) --deployment --without test development \
73
- && yarn install --pure-lockfile --ignore-engines \
74
- && yarn cache clean
75
-
76
-RUN addgroup -g ${GID} mastodon && adduser -h /mastodon -s /bin/sh -D -G mastodon -u ${UID} mastodon \
77
- && mkdir -p /mastodon/public/system /mastodon/public/assets /mastodon/public/packs \
78
- && chown -R mastodon:mastodon /mastodon/public
79
-
80
-COPY . /mastodon
81
-
82
-RUN chown -R mastodon:mastodon /mastodon
83
-
84
-VOLUME /mastodon/public/system
85
-
80
+RUN apt update && \
81
+	echo "Etc/UTC" > /etc/localtime && \
82
+	ln -s /opt/jemalloc/lib/* /usr/lib/ && \
83
+	apt -y dist-upgrade && \
84
+	apt install -y whois wget && \
85
+	addgroup --gid $GID mastodon && \
86
+	useradd -m -u $UID -g $GID -d /opt/mastodon mastodon && \
87
+	echo "mastodon:`head /dev/urandom | tr -dc A-Za-z0-9 | head -c 24 | mkpasswd -s -m sha-256`" | chpasswd
88
+
89
+# Install masto runtime deps
90
+RUN apt -y --no-install-recommends install \
91
+	  libssl1.1 libpq5 imagemagick ffmpeg \
92
+	  libicu60 libprotobuf10 libidn11 libyaml-0-2 \
93
+	  file ca-certificates tzdata libreadline7 && \
94
+	apt -y install gcc && \
95
+	ln -s /opt/mastodon /mastodon && \
96
+	gem install bundler && \
97
+	rm -rf /var/cache && \
98
+	rm -rf /var/lib/apt
99
+
100
+# Add tini
101
+ENV TINI_VERSION="0.18.0"
102
+ENV TINI_SUM="12d20136605531b09a2c2dac02ccee85e1b874eb322ef6baf7561cd93f93c855"
103
+ADD https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini /tini
104
+RUN echo "$TINI_SUM tini" | sha256sum -c -
105
+RUN chmod +x /tini
106
+
107
+# Copy over masto source, and dependencies from building, and set permissions
108
+COPY --chown=mastodon:mastodon . /opt/mastodon
109
+COPY --from=build-dep --chown=mastodon:mastodon /opt/mastodon /opt/mastodon
110
+
111
+# Run masto services in prod mode
112
+ENV RAILS_ENV="production"
113
+ENV NODE_ENV="production"
114
+
115
+# Tell rails to serve static files
116
+ENV RAILS_SERVE_STATIC_FILES="true"
117
+
118
+# Set the run user
86 119
 USER mastodon
87 120
 
88
-RUN OTP_SECRET=precompile_placeholder SECRET_KEY_BASE=precompile_placeholder bundle exec rails assets:precompile
121
+# Precompile assets
122
+RUN cd ~ && \
123
+	OTP_SECRET=precompile_placeholder SECRET_KEY_BASE=precompile_placeholder rails assets:precompile && \
124
+	yarn cache clean
89 125
 
90
-ENTRYPOINT ["/sbin/tini", "--"]
126
+# Set the work dir and the container entry point
127
+WORKDIR /opt/mastodon
128
+ENTRYPOINT ["/tini", "--"]

+ 14
- 14
Gemfile View File

@@ -6,16 +6,16 @@ ruby '>= 2.4.0', '< 2.7.0'
6 6
 gem 'pkg-config', '~> 1.3'
7 7
 
8 8
 gem 'puma', '~> 3.12'
9
-gem 'rails', '~> 5.2.2'
9
+gem 'rails', '~> 5.2.3'
10 10
 gem 'thor', '~> 0.20'
11 11
 
12 12
 gem 'hamlit-rails', '~> 0.2'
13 13
 gem 'pg', '~> 1.1'
14 14
 gem 'makara', '~> 0.4'
15 15
 gem 'pghero', '~> 2.2'
16
-gem 'dotenv-rails', '~> 2.6'
16
+gem 'dotenv-rails', '~> 2.7'
17 17
 
18
-gem 'aws-sdk-s3', '~> 1.30', require: false
18
+gem 'aws-sdk-s3', '~> 1.36', require: false
19 19
 gem 'fog-core', '<= 2.1.0'
20 20
 gem 'fog-openstack', '~> 0.3', require: false
21 21
 gem 'paperclip', '~> 6.0'
@@ -24,13 +24,13 @@ gem 'streamio-ffmpeg', '~> 3.0'
24 24
 
25 25
 gem 'active_model_serializers', '~> 0.10'
26 26
 gem 'addressable', '~> 2.6'
27
-gem 'bootsnap', '~> 1.3', require: false
27
+gem 'bootsnap', '~> 1.4', require: false
28 28
 gem 'browser'
29 29
 gem 'charlock_holmes', '~> 0.7.6'
30 30
 gem 'iso-639'
31 31
 gem 'chewy', '~> 5.0'
32 32
 gem 'cld3', '~> 3.2.3'
33
-gem 'devise', '~> 4.5'
33
+gem 'devise', '~> 4.6'
34 34
 gem 'devise-two-factor', '~> 3.0'
35 35
 
36 36
 group :pam_authentication, optional: true do
@@ -85,8 +85,8 @@ gem 'strong_migrations', '~> 0.3'
85 85
 gem 'tty-command', '~> 0.8', require: false
86 86
 gem 'tty-prompt', '~> 0.18', require: false
87 87
 gem 'twitter-text', '~> 1.14'
88
-gem 'tzinfo-data', '~> 1.2018'
89
-gem 'webpacker', '~> 3.5'
88
+gem 'tzinfo-data', '~> 1.2019'
89
+gem 'webpacker', '~> 4.0'
90 90
 gem 'webpush'
91 91
 
92 92
 gem 'json-ld', '~> 3.0'
@@ -97,7 +97,7 @@ group :development, :test do
97 97
   gem 'fabrication', '~> 2.20'
98 98
   gem 'fuubar', '~> 2.3'
99 99
   gem 'i18n-tasks', '~> 0.9', require: false
100
-  gem 'pry-byebug', '~> 3.6'
100
+  gem 'pry-byebug', '~> 3.7'
101 101
   gem 'pry-rails', '~> 0.3'
102 102
   gem 'rspec-rails', '~> 3.8'
103 103
 end
@@ -107,19 +107,19 @@ group :production, :test do
107 107
 end
108 108
 
109 109
 group :test do
110
-  gem 'capybara', '~> 3.12'
110
+  gem 'capybara', '~> 3.16'
111 111
   gem 'climate_control', '~> 0.2'
112 112
   gem 'faker', '~> 1.9'
113
-  gem 'microformats', '~> 4.0'
113
+  gem 'microformats', '~> 4.1'
114 114
   gem 'rails-controller-testing', '~> 1.0'
115 115
   gem 'rspec-sidekiq', '~> 3.0'
116 116
   gem 'simplecov', '~> 0.16', require: false
117 117
   gem 'webmock', '~> 3.5'
118
-  gem 'parallel_tests', '~> 2.27'
118
+  gem 'parallel_tests', '~> 2.28'
119 119
 end
120 120
 
121 121
 group :development do
122
-  gem 'active_record_query_trace', '~> 1.5'
122
+  gem 'active_record_query_trace', '~> 1.6'
123 123
   gem 'annotate', '~> 2.7'
124 124
   gem 'better_errors', '~> 2.5'
125 125
   gem 'binding_of_caller', '~> 0.7'
@@ -127,8 +127,8 @@ group :development do
127 127
   gem 'letter_opener', '~> 1.7'
128 128
   gem 'letter_opener_web', '~> 1.3'
129 129
   gem 'memory_profiler'
130
-  gem 'rubocop', '~> 0.63', require: false
131
-  gem 'brakeman', '~> 4.4', require: false
130
+  gem 'rubocop', '~> 0.67', require: false
131
+  gem 'brakeman', '~> 4.5', require: false
132 132
   gem 'bundler-audit', '~> 0.6', require: false
133 133
   gem 'scss_lint', '~> 0.57', require: false
134 134
 

+ 121
- 120
Gemfile.lock View File

@@ -15,49 +15,49 @@ GIT
15 15
 GEM
16 16
   remote: https://rubygems.org/
17 17
   specs:
18
-    actioncable (5.2.2)
19
-      actionpack (= 5.2.2)
18
+    actioncable (5.2.3)
19
+      actionpack (= 5.2.3)
20 20
       nio4r (~> 2.0)
21 21
       websocket-driver (>= 0.6.1)
22
-    actionmailer (5.2.2)
23
-      actionpack (= 5.2.2)
24
-      actionview (= 5.2.2)
25
-      activejob (= 5.2.2)
22
+    actionmailer (5.2.3)
23
+      actionpack (= 5.2.3)
24
+      actionview (= 5.2.3)
25
+      activejob (= 5.2.3)
26 26
       mail (~> 2.5, >= 2.5.4)
27 27
       rails-dom-testing (~> 2.0)
28
-    actionpack (5.2.2)
29
-      actionview (= 5.2.2)
30
-      activesupport (= 5.2.2)
28
+    actionpack (5.2.3)
29
+      actionview (= 5.2.3)
30
+      activesupport (= 5.2.3)
31 31
       rack (~> 2.0)
32 32
       rack-test (>= 0.6.3)
33 33
       rails-dom-testing (~> 2.0)
34 34
       rails-html-sanitizer (~> 1.0, >= 1.0.2)
35
-    actionview (5.2.2)
36
-      activesupport (= 5.2.2)
35
+    actionview (5.2.3)
36
+      activesupport (= 5.2.3)
37 37
       builder (~> 3.1)
38 38
       erubi (~> 1.4)
39 39
       rails-dom-testing (~> 2.0)
40 40
       rails-html-sanitizer (~> 1.0, >= 1.0.3)
41
-    active_model_serializers (0.10.8)
41
+    active_model_serializers (0.10.9)
42 42
       actionpack (>= 4.1, < 6)
43 43
       activemodel (>= 4.1, < 6)
44 44
       case_transform (>= 0.2)
45 45
       jsonapi-renderer (>= 0.1.1.beta1, < 0.3)
46
-    active_record_query_trace (1.5.4)
47
-    activejob (5.2.2)
48
-      activesupport (= 5.2.2)
46
+    active_record_query_trace (1.6.2)
47
+    activejob (5.2.3)
48
+      activesupport (= 5.2.3)
49 49
       globalid (>= 0.3.6)
50
-    activemodel (5.2.2)
51
-      activesupport (= 5.2.2)
52
-    activerecord (5.2.2)
53
-      activemodel (= 5.2.2)
54
-      activesupport (= 5.2.2)
50
+    activemodel (5.2.3)
51
+      activesupport (= 5.2.3)
52
+    activerecord (5.2.3)
53
+      activemodel (= 5.2.3)
54
+      activesupport (= 5.2.3)
55 55
       arel (>= 9.0)
56
-    activestorage (5.2.2)
57
-      actionpack (= 5.2.2)
58
-      activerecord (= 5.2.2)
56
+    activestorage (5.2.3)
57
+      actionpack (= 5.2.3)
58
+      activerecord (= 5.2.3)
59 59
       marcel (~> 0.3.1)
60
-    activesupport (5.2.2)
60
+    activesupport (5.2.3)
61 61
       concurrent-ruby (~> 1.0, >= 1.0.2)
62 62
       i18n (>= 0.7, < 2)
63 63
       minitest (~> 5.1)
@@ -75,32 +75,33 @@ GEM
75 75
       encryptor (~> 3.0.0)
76 76
     av (0.9.0)
77 77
       cocaine (~> 0.5.3)
78
-    aws-eventstream (1.0.1)
79
-    aws-partitions (1.131.0)
80
-    aws-sdk-core (3.45.0)
81
-      aws-eventstream (~> 1.0)
78
+    aws-eventstream (1.0.2)
79
+    aws-partitions (1.147.0)
80
+    aws-sdk-core (3.48.3)
81
+      aws-eventstream (~> 1.0, >= 1.0.2)
82 82
       aws-partitions (~> 1.0)
83
-      aws-sigv4 (~> 1.0)
83
+      aws-sigv4 (~> 1.1)
84 84
       jmespath (~> 1.0)
85
-    aws-sdk-kms (1.13.0)
86
-      aws-sdk-core (~> 3, >= 3.39.0)
87
-      aws-sigv4 (~> 1.0)
88
-    aws-sdk-s3 (1.30.1)
89
-      aws-sdk-core (~> 3, >= 3.39.0)
85
+    aws-sdk-kms (1.16.0)
86
+      aws-sdk-core (~> 3, >= 3.48.2)
87
+      aws-sigv4 (~> 1.1)
88
+    aws-sdk-s3 (1.36.0)
89
+      aws-sdk-core (~> 3, >= 3.48.2)
90 90
       aws-sdk-kms (~> 1)
91 91
       aws-sigv4 (~> 1.0)
92
-    aws-sigv4 (1.0.3)
92
+    aws-sigv4 (1.1.0)
93
+      aws-eventstream (~> 1.0, >= 1.0.2)
93 94
     bcrypt (3.1.12)
94 95
     benchmark-ips (2.7.2)
95
-    better_errors (2.5.0)
96
+    better_errors (2.5.1)
96 97
       coderay (>= 1.0.0)
97 98
       erubi (>= 1.0.0)
98 99
       rack (>= 0.9.0)
99 100
     binding_of_caller (0.8.0)
100 101
       debug_inspector (>= 0.0.1)
101
-    bootsnap (1.3.2)
102
+    bootsnap (1.4.3)
102 103
       msgpack (~> 1.0)
103
-    brakeman (4.4.0)
104
+    brakeman (4.5.0)
104 105
     browser (2.5.3)
105 106
     builder (3.2.3)
106 107
     bullet (5.9.0)
@@ -109,7 +110,7 @@ GEM
109 110
     bundler-audit (0.6.1)
110 111
       bundler (>= 1.2.0, < 3)
111 112
       thor (~> 0.18)
112
-    byebug (10.0.2)
113
+    byebug (11.0.0)
113 114
     capistrano (3.11.0)
114 115
       airbrussh (>= 1.0.0)
115 116
       i18n
@@ -126,7 +127,7 @@ GEM
126 127
       sshkit (~> 1.3)
127 128
     capistrano-yarn (2.0.2)
128 129
       capistrano (~> 3.0)
129
-    capybara (3.12.0)
130
+    capybara (3.16.1)
130 131
       addressable
131 132
       mini_mime (>= 0.1.3)
132 133
       nokogiri (~> 1.8)
@@ -148,7 +149,7 @@ GEM
148 149
     cocaine (0.5.8)
149 150
       climate_control (>= 0.0.3, < 1.0)
150 151
     coderay (1.1.2)
151
-    concurrent-ruby (1.1.4)
152
+    concurrent-ruby (1.1.5)
152 153
     connection_pool (2.2.2)
153 154
     crack (0.4.3)
154 155
       safe_yaml (~> 1.0.0)
@@ -164,7 +165,7 @@ GEM
164 165
       rack (>= 1)
165 166
       rake (> 10, < 13)
166 167
       thor (~> 0.19)
167
-    devise (4.5.0)
168
+    devise (4.6.2)
168 169
       bcrypt (~> 3.0)
169 170
       orm_adapter (~> 0.1)
170 171
       railties (>= 4.1.0, < 6.0)
@@ -185,10 +186,10 @@ GEM
185 186
       unf (>= 0.0.5, < 1.0.0)
186 187
     doorkeeper (5.0.2)
187 188
       railties (>= 4.2)
188
-    dotenv (2.6.0)
189
-    dotenv-rails (2.6.0)
190
-      dotenv (= 2.6.0)
191
-      railties (>= 3.2, < 6.0)
189
+    dotenv (2.7.2)
190
+    dotenv-rails (2.7.2)
191
+      dotenv (= 2.7.2)
192
+      railties (>= 3.2, < 6.1)
192 193
     elasticsearch (6.0.2)
193 194
       elasticsearch-api (= 6.0.2)
194 195
       elasticsearch-transport (= 6.0.2)
@@ -205,7 +206,7 @@ GEM
205 206
       tzinfo
206 207
     excon (0.62.0)
207 208
     fabrication (2.20.1)
208
-    faker (1.9.1)
209
+    faker (1.9.3)
209 210
       i18n (>= 0.7)
210 211
     faraday (0.15.0)
211 212
       multipart-post (>= 1.2, < 3)
@@ -232,18 +233,18 @@ GEM
232 233
       rspec-core (~> 3.0)
233 234
       ruby-progressbar (~> 1.4)
234 235
     get_process_mem (0.2.3)
235
-    globalid (0.4.1)
236
+    globalid (0.4.2)
236 237
       activesupport (>= 4.2.0)
237 238
     goldfinger (2.1.0)
238 239
       addressable (~> 2.5)
239 240
       http (~> 3.0)
240 241
       nokogiri (~> 1.8)
241 242
       oj (~> 3.0)
242
-    hamlit (2.8.8)
243
+    hamlit (2.9.3)
243 244
       temple (>= 0.8.0)
244 245
       thor
245 246
       tilt
246
-    hamlit-rails (0.2.0)
247
+    hamlit-rails (0.2.3)
247 248
       actionpack (>= 4.0.1)
248 249
       activesupport (>= 4.0.1)
249 250
       hamlit (>= 1.2.0)
@@ -253,7 +254,7 @@ GEM
253 254
     hashdiff (0.3.7)
254 255
     hashie (3.6.0)
255 256
     heapy (0.1.4)
256
-    highline (2.0.0)
257
+    highline (2.0.1)
257 258
     hiredis (0.6.3)
258 259
     hkdf (0.3.0)
259 260
     htmlentities (4.3.4)
@@ -266,12 +267,12 @@ GEM
266 267
       domain_name (~> 0.5)
267 268
     http-form_data (2.1.1)
268 269
     http_accept_language (2.1.1)
269
-    httplog (1.2.0)
270
+    httplog (1.2.2)
270 271
       rack (>= 1.0)
271 272
       rainbow (>= 2.0.0)
272
-    i18n (1.5.2)
273
+    i18n (1.6.0)
273 274
       concurrent-ruby (~> 1.0)
274
-    i18n-tasks (0.9.28)
275
+    i18n-tasks (0.9.29)
275 276
       activesupport (>= 4.0.2)
276 277
       ast (>= 2.1.0)
277 278
       erubi
@@ -327,25 +328,25 @@ GEM
327 328
       nokogiri (>= 1.5.9)
328 329
     mail (2.7.1)
329 330
       mini_mime (>= 0.1.1)
330
-    makara (0.4.0)
331
+    makara (0.4.1)
331 332
       activerecord (>= 3.0.0)
332 333
     marcel (0.3.3)
333 334
       mimemagic (~> 0.3.2)
334 335
     mario-redis-lock (1.2.1)
335 336
       redis (>= 3.0.5)
336
-    memory_profiler (0.9.12)
337
+    memory_profiler (0.9.13)
337 338
     method_source (0.9.2)
338
-    microformats (4.0.7)
339
-      json
340
-      nokogiri
339
+    microformats (4.1.0)
340
+      json (~> 2.1)
341
+      nokogiri (~> 1.8, >= 1.8.3)
341 342
     mime-types (3.2.2)
342 343
       mime-types-data (~> 3.2015)
343 344
     mime-types-data (3.2018.0812)
344
-    mimemagic (0.3.2)
345
+    mimemagic (0.3.3)
345 346
     mini_mime (1.0.1)
346 347
     mini_portile2 (2.4.0)
347 348
     minitest (5.11.3)
348
-    msgpack (1.2.4)
349
+    msgpack (1.2.9)
349 350
     multi_json (1.13.1)
350 351
     multipart-post (2.0.0)
351 352
     necromancer (0.4.0)
@@ -354,7 +355,7 @@ GEM
354 355
       net-ssh (>= 2.6.5)
355 356
     net-ssh (5.0.2)
356 357
     nio4r (2.3.1)
357
-    nokogiri (1.10.1)
358
+    nokogiri (1.10.2)
358 359
       mini_portile2 (~> 2.4.0)
359 360
     nokogumbo (2.0.0)
360 361
       nokogiri (~> 1.8, >= 1.8.4)
@@ -363,7 +364,7 @@ GEM
363 364
       concurrent-ruby (~> 1.0, >= 1.0.2)
364 365
       sidekiq (>= 3.5)
365 366
       statsd-ruby (~> 1.4, >= 1.4.0)
366
-    oj (3.7.8)
367
+    oj (3.7.11)
367 368
     omniauth (1.9.0)
368 369
       hashie (>= 3.4.6, < 3.7.0)
369 370
       rack (>= 1.6.2, < 3)
@@ -389,10 +390,10 @@ GEM
389 390
     paperclip-av-transcoder (0.6.4)
390 391
       av (~> 0.9.0)
391 392
       paperclip (>= 2.5.2)
392
-    parallel (1.13.0)
393
-    parallel_tests (2.27.1)
393
+    parallel (1.17.0)
394
+    parallel_tests (2.28.0)
394 395
       parallel
395
-    parser (2.6.0.0)
396
+    parser (2.6.2.0)
396 397
       ast (~> 2.4.0)
397 398
     pastel (0.7.2)
398 399
       equatable (~> 0.5.0)
@@ -400,8 +401,7 @@ GEM
400 401
     pg (1.1.4)
401 402
     pghero (2.2.0)
402 403
       activerecord
403
-    pkg-config (1.3.2)
404
-    powerpack (0.1.2)
404
+    pkg-config (1.3.7)
405 405
     premailer (1.11.1)
406 406
       addressable
407 407
       css_parser (>= 1.6.0)
@@ -413,38 +413,39 @@ GEM
413 413
     pry (0.12.2)
414 414
       coderay (~> 1.1.0)
415 415
       method_source (~> 0.9.0)
416
-    pry-byebug (3.6.0)
417
-      byebug (~> 10.0)
416
+    pry-byebug (3.7.0)
417
+      byebug (~> 11.0)
418 418
       pry (~> 0.10)
419 419
     pry-rails (0.3.9)
420 420
       pry (>= 0.10.4)
421
+    psych (3.1.0)
421 422
     public_suffix (3.0.3)
422
-    puma (3.12.0)
423
+    puma (3.12.1)
423 424
     pundit (2.0.1)
424 425
       activesupport (>= 3.0.0)
425 426
     raabro (1.1.6)
426
-    rack (2.0.6)
427
+    rack (2.0.7)
427 428
     rack-attack (5.4.2)
428 429
       rack (>= 1.0, < 3)
429
-    rack-cors (1.0.2)
430
+    rack-cors (1.0.3)
430 431
     rack-protection (2.0.5)
431 432
       rack
432
-    rack-proxy (0.6.4)
433
+    rack-proxy (0.6.5)
433 434
       rack
434 435
     rack-test (1.1.0)
435 436
       rack (>= 1.0, < 3)
436
-    rails (5.2.2)
437
-      actioncable (= 5.2.2)
438
-      actionmailer (= 5.2.2)
439
-      actionpack (= 5.2.2)
440
-      actionview (= 5.2.2)
441
-      activejob (= 5.2.2)
442
-      activemodel (= 5.2.2)
443
-      activerecord (= 5.2.2)
444
-      activestorage (= 5.2.2)
445
-      activesupport (= 5.2.2)
437
+    rails (5.2.3)
438
+      actioncable (= 5.2.3)
439
+      actionmailer (= 5.2.3)
440
+      actionpack (= 5.2.3)
441
+      actionview (= 5.2.3)
442
+      activejob (= 5.2.3)
443
+      activemodel (= 5.2.3)
444
+      activerecord (= 5.2.3)
445
+      activestorage (= 5.2.3)
446
+      activesupport (= 5.2.3)
446 447
       bundler (>= 1.3.0)
447
-      railties (= 5.2.2)
448
+      railties (= 5.2.3)
448 449
       sprockets-rails (>= 2.0.0)
449 450
     rails-controller-testing (1.0.4)
450 451
       actionpack (>= 5.0.1.x)
@@ -455,14 +456,14 @@ GEM
455 456
       nokogiri (>= 1.6)
456 457
     rails-html-sanitizer (1.0.4)
457 458
       loofah (~> 2.2, >= 2.2.2)
458
-    rails-i18n (5.1.2)
459
+    rails-i18n (5.1.3)
459 460
       i18n (>= 0.7, < 2)
460 461
       railties (>= 5.0, < 6)
461 462
     rails-settings-cached (0.6.6)
462 463
       rails (>= 4.2.0)
463
-    railties (5.2.2)
464
-      actionpack (= 5.2.2)
465
-      activesupport (= 5.2.2)
464
+    railties (5.2.3)
465
+      actionpack (= 5.2.3)
466
+      activesupport (= 5.2.3)
466 467
       method_source
467 468
       rake (>= 0.8.7)
468 469
       thor (>= 0.19.0, < 2.0)
@@ -498,9 +499,9 @@ GEM
498 499
     regexp_parser (1.3.0)
499 500
     request_store (1.4.1)
500 501
       rack (>= 1.4)
501
-    responders (2.4.0)
502
-      actionpack (>= 4.2.0, < 5.3)
503
-      railties (>= 4.2.0, < 5.3)
502
+    responders (2.4.1)
503
+      actionpack (>= 4.2.0, < 6.0)
504
+      railties (>= 4.2.0, < 6.0)
504 505
     rotp (2.1.2)
505 506
     rpam2 (4.0.2)
506 507
     rqrcode (0.10.1)
@@ -525,14 +526,14 @@ GEM
525 526
       rspec-core (~> 3.0, >= 3.0.0)
526 527
       sidekiq (>= 2.4.0)
527 528
     rspec-support (3.8.0)
528
-    rubocop (0.63.1)
529
+    rubocop (0.67.1)
529 530
       jaro_winkler (~> 1.5.1)
530 531
       parallel (~> 1.10)
531 532
       parser (>= 2.5, != 2.5.1.1)
532
-      powerpack (~> 0.1)
533
+      psych (>= 3.1.0)
533 534
       rainbow (>= 2.2.2, < 4.0)
534 535
       ruby-progressbar (~> 1.7)
535
-      unicode-display_width (~> 1.4.0)
536
+      unicode-display_width (>= 1.4.0, < 1.6)
536 537
     ruby-progressbar (1.10.0)
537 538
     ruby-saml (1.9.0)
538 539
       nokogiri (>= 1.5.10)
@@ -563,9 +564,9 @@ GEM
563 564
       rufus-scheduler (~> 3.2)
564 565
       sidekiq (>= 3)
565 566
       tilt (>= 1.4.0)
566
-    sidekiq-unique-jobs (6.0.8)
567
+    sidekiq-unique-jobs (6.0.12)
567 568
       concurrent-ruby (~> 1.0, >= 1.0.5)
568
-      sidekiq (>= 4.0, < 6.0)
569
+      sidekiq (>= 4.0, < 7.0)
569 570
       thor (~> 0)
570 571
     simple-navigation (4.0.5)
571 572
       activesupport (>= 2.3.2)
@@ -594,14 +595,14 @@ GEM
594 595
       multi_json (~> 1.8)
595 596
     strong_migrations (0.3.1)
596 597
       activerecord (>= 3.2.0)
597
-    temple (0.8.0)
598
+    temple (0.8.1)
598 599
     terminal-table (1.8.0)
599 600
       unicode-display_width (~> 1.1, >= 1.1.1)
600 601
     terrapin (0.6.0)
601 602
       climate_control (>= 0.0.3, < 1.0)
602 603
     thor (0.20.3)
603 604
     thread_safe (0.3.6)
604
-    tilt (2.0.8)
605
+    tilt (2.0.9)
605 606
     timers (4.2.0)
606 607
     tty-color (0.4.3)
607 608
     tty-command (0.8.2)
@@ -622,24 +623,24 @@ GEM
622 623
       unf (~> 0.1.0)
623 624
     tzinfo (1.2.5)
624 625
       thread_safe (~> 0.1)
625
-    tzinfo-data (1.2018.9)
626
+    tzinfo-data (1.2019.1)
626 627
       tzinfo (>= 1.0.0)
627 628
     unf (0.1.4)
628 629
       unf_ext
629 630
     unf_ext (0.0.7.5)
630
-    unicode-display_width (1.4.1)
631
+    unicode-display_width (1.5.0)
631 632
     uniform_notifier (1.12.1)
632
-    warden (1.2.7)
633
-      rack (>= 1.0)
633
+    warden (1.2.8)
634
+      rack (>= 2.0.6)
634 635
     webmock (3.5.1)
635 636
       addressable (>= 2.3.6)
636 637
       crack (>= 0.3.2)
637 638
       hashdiff
638
-    webpacker (3.5.5)
639
+    webpacker (4.0.2)
639 640
       activesupport (>= 4.2)
640 641
       rack-proxy (>= 0.6.1)
641 642
       railties (>= 4.2)
642
-    webpush (0.3.6)
643
+    webpush (0.3.7)
643 644
       hkdf (~> 0.2)
644 645
       jwt (~> 2.0)
645 646
     websocket-driver (0.7.0)
@@ -654,14 +655,14 @@ PLATFORMS
654 655
 
655 656
 DEPENDENCIES
656 657
   active_model_serializers (~> 0.10)
657
-  active_record_query_trace (~> 1.5)
658
+  active_record_query_trace (~> 1.6)
658 659
   addressable (~> 2.6)
659 660
   annotate (~> 2.7)
660
-  aws-sdk-s3 (~> 1.30)
661
+  aws-sdk-s3 (~> 1.36)
661 662
   better_errors (~> 2.5)
662 663
   binding_of_caller (~> 0.7)
663
-  bootsnap (~> 1.3)
664
-  brakeman (~> 4.4)
664
+  bootsnap (~> 1.4)
665
+  brakeman (~> 4.5)
665 666
   browser
666 667
   bullet (~> 5.9)
667 668
   bundler-audit (~> 0.6)
@@ -669,18 +670,18 @@ DEPENDENCIES
669 670
   capistrano-rails (~> 1.4)
670 671
   capistrano-rbenv (~> 2.1)
671 672
   capistrano-yarn (~> 2.0)
672
-  capybara (~> 3.12)
673
+  capybara (~> 3.16)
673 674
   charlock_holmes (~> 0.7.6)
674 675
   chewy (~> 5.0)
675 676
   cld3 (~> 3.2.3)
676 677
   climate_control (~> 0.2)
677 678
   concurrent-ruby
678 679
   derailed_benchmarks
679
-  devise (~> 4.5)
680
+  devise (~> 4.6)
680 681
   devise-two-factor (~> 3.0)
681 682
   devise_pam_authenticatable2 (~> 9.2)
682 683
   doorkeeper (~> 5.0)
683
-  dotenv-rails (~> 2.6)
684
+  dotenv-rails (~> 2.7)
684 685
   fabrication (~> 2.20)
685 686
   faker (~> 1.9)
686 687
   fast_blank (~> 1.0)
@@ -709,7 +710,7 @@ DEPENDENCIES
709 710
   makara (~> 0.4)
710 711
   mario-redis-lock (~> 1.2)
711 712
   memory_profiler
712
-  microformats (~> 4.0)
713
+  microformats (~> 4.1)
713 714
   mime-types (~> 3.2)
714 715
   net-ldap (~> 0.10)
715 716
   nokogiri (~> 1.10)
@@ -722,20 +723,20 @@ DEPENDENCIES
722 723
   ox (~> 2.10)
723 724
   paperclip (~> 6.0)
724 725
   paperclip-av-transcoder (~> 0.6)
725
-  parallel_tests (~> 2.27)
726
+  parallel_tests (~> 2.28)
726 727
   pg (~> 1.1)
727 728
   pghero (~> 2.2)
728 729
   pkg-config (~> 1.3)
729 730
   posix-spawn!
730 731
   premailer-rails
731 732
   private_address_check (~> 0.5)
732
-  pry-byebug (~> 3.6)
733
+  pry-byebug (~> 3.7)
733 734
   pry-rails (~> 0.3)
734 735
   puma (~> 3.12)
735 736
   pundit (~> 2.0)
736 737
   rack-attack (~> 5.4)
737 738
   rack-cors (~> 1.0)
738
-  rails (~> 5.2.2)
739
+  rails (~> 5.2.3)
739 740
   rails-controller-testing (~> 1.0)
740 741
   rails-i18n (~> 5.1)
741 742
   rails-settings-cached (~> 0.6)
@@ -746,7 +747,7 @@ DEPENDENCIES
746 747
   rqrcode (~> 0.10)
747 748
   rspec-rails (~> 3.8)
748 749
   rspec-sidekiq (~> 3.0)
749
-  rubocop (~> 0.63)
750
+  rubocop (~> 0.67)
750 751
   sanitize (~> 5.0)
751 752
   scss_lint (~> 0.57)
752 753
   sidekiq (~> 5.2)
@@ -765,13 +766,13 @@ DEPENDENCIES
765 766
   tty-command (~> 0.8)
766 767
   tty-prompt (~> 0.18)
767 768
   twitter-text (~> 1.14)
768
-  tzinfo-data (~> 1.2018)
769
+  tzinfo-data (~> 1.2019)
769 770
   webmock (~> 3.5)
770
-  webpacker (~> 3.5)
771
+  webpacker (~> 4.0)
771 772
   webpush
772 773
 
773 774
 RUBY VERSION
774
-   ruby 2.6.0p0
775
+   ruby 2.6.1p33
775 776
 
776 777
 BUNDLED WITH
777 778
    1.17.3

+ 12
- 1
Vagrantfile View File

@@ -44,7 +44,18 @@ sudo apt-get install \
44 44
 
45 45
 # Install rvm
46 46
 read RUBY_VERSION < .ruby-version
47
-gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
47
+
48
+gpg_command="gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB"
49
+$($gpg_command)
50
+if [ $? -ne 0 ];then
51
+  echo "GPG command failed, This prevented RVM from installing."
52
+  echo "Retrying once..." && $($gpg_command)
53
+  if [ $? -ne 0 ];then
54
+    echo "GPG failed for the second time, please ensure network connectivity."
55
+    echo "Exiting..." && exit 1
56
+  fi
57
+fi
58
+
48 59
 curl -sSL https://raw.githubusercontent.com/rvm/rvm/stable/binscripts/rvm-installer | bash -s stable --ruby=$RUBY_VERSION
49 60
 source /home/vagrant/.rvm/scripts/rvm
50 61
 

+ 1
- 1
app/chewy/statuses_index.rb View File

@@ -48,6 +48,7 @@ class StatusesIndex < Chewy::Index
48 48
     end
49 49
 
50 50
     root date_detection: false do
51
+      field :id, type: 'long'
51 52
       field :account_id, type: 'long'
52 53
 
53 54
       field :text, type: 'text', value: ->(status) { [status.spoiler_text, Formatter.instance.plaintext(status)].concat(status.media_attachments.map(&:description)).join("\n\n") } do
@@ -55,7 +56,6 @@ class StatusesIndex < Chewy::Index
55 56
       end
56 57
 
57 58
       field :searchable_by, type: 'long', value: ->(status, crutches) { status.searchable_by(crutches) }
58
-      field :created_at, type: 'date'
59 59
     end
60 60
   end
61 61
 end

+ 9
- 21
app/controllers/about_controller.rb View File

@@ -1,26 +1,25 @@
1 1
 # frozen_string_literal: true
2 2
 
3 3
 class AboutController < ApplicationController
4
-  before_action :set_body_classes
4
+  layout 'public'
5
+
5 6
   before_action :set_instance_presenter, only: [:show, :more, :terms]
6 7
 
7 8
   def show
8
-    serializable_resource = ActiveModelSerializers::SerializableResource.new(InitialStatePresenter.new(initial_state_params), serializer: InitialStateSerializer)
9
-    @initial_state_json   = serializable_resource.to_json
9
+    @hide_navbar = true
10 10
   end
11 11
 
12
-  def more
13
-    render layout: 'public'
14
-  end
12
+  def more; end
15 13
 
16
-  def terms
17
-    render layout: 'public'
18
-  end
14
+  def terms; end
19 15
 
20 16
   private
21 17
 
22 18
   def new_user
23
-    User.new.tap(&:build_account)
19
+    User.new.tap do |user|
20
+      user.build_account
21
+      user.build_invite_request
22
+    end
24 23
   end
25 24
 
26 25
   helper_method :new_user
@@ -28,15 +27,4 @@ class AboutController < ApplicationController
28 27
   def set_instance_presenter
29 28
     @instance_presenter = InstancePresenter.new
30 29
   end
31
-
32
-  def set_body_classes
33
-    @body_classes = 'with-modals'
34
-  end
35
-
36
-  def initial_state_params
37
-    {
38
-      settings: { known_fediverse: Setting.show_known_fediverse_at_about_page },
39
-      token: current_session&.token,
40
-    }
41
-  end
42 30
 end

+ 28
- 6
app/controllers/accounts_controller.rb View File

@@ -10,6 +10,8 @@ class AccountsController < ApplicationController
10 10
   def show
11 11
     respond_to do |format|
12 12
       format.html do
13
+        mark_cacheable! unless user_signed_in?
14
+
13 15
         @body_classes      = 'with-modals'
14 16
         @pinned_statuses   = []
15 17
         @endorsed_accounts = @account.endorsed_accounts.to_a.sample(4)
@@ -30,17 +32,21 @@ class AccountsController < ApplicationController
30 32
       end
31 33
 
32 34
       format.atom do
35
+        mark_cacheable!
36
+
33 37
         @entries = @account.stream_entries.where(hidden: false).with_includes.paginate_by_max_id(PAGE_SIZE, params[:max_id], params[:since_id])
34 38
         render xml: OStatus::AtomSerializer.render(OStatus::AtomSerializer.new.feed(@account, @entries.reject { |entry| entry.status.nil? }))
35 39
       end
36 40
 
37 41
       format.rss do
42
+        mark_cacheable!
43
+
38 44
         @statuses = cache_collection(default_statuses.without_reblogs.without_replies.limit(PAGE_SIZE), Status)
39 45
         render xml: RSS::AccountSerializer.render(@account, @statuses)
40 46
       end
41 47
 
42 48
       format.json do
43
-        skip_session!
49
+        mark_cacheable!
44 50
 
45 51
         render_cached_json(['activitypub', 'actor', @account], content_type: 'application/activity+json') do
46 52
           ActiveModelSerializers::SerializableResource.new(@account, serializer: ActivityPub::ActorSerializer, adapter: ActivityPub::Adapter)
@@ -52,11 +58,12 @@ class AccountsController < ApplicationController
52 58
   private
53 59
 
54 60
   def show_pinned_statuses?
55
-    [replies_requested?, media_requested?, params[:max_id].present?, params[:min_id].present?].none?
61
+    [replies_requested?, media_requested?, tag_requested?, params[:max_id].present?, params[:min_id].present?].none?
56 62
   end
57 63
 
58 64
   def filtered_statuses
59 65
     default_statuses.tap do |statuses|
66
+      statuses.merge!(hashtag_scope)    if tag_requested?
60 67
       statuses.merge!(only_media_scope) if media_requested?
61 68
       statuses.merge!(no_replies_scope) unless replies_requested?
62 69
     end
@@ -78,12 +85,21 @@ class AccountsController < ApplicationController
78 85
     Status.without_replies
79 86
   end
80 87
 
81
-  def set_account
82
-    @account = Account.find_local!(params[:username])
88
+  def hashtag_scope
89
+    tag = Tag.find_normalized(params[:tag])
90
+
91
+    if tag
92
+      Status.tagged_with(tag.id)
93
+    else
94
+      Status.none
95
+    end
96
+  end
97
+
98
+  def username_param
99
+    params[:username]
83 100
   end
84 101
 
85 102
   def older_url
86
-    ::Rails.logger.info("older: max_id #{@statuses.last.id}, url #{pagination_url(max_id: @statuses.last.id)}")
87 103
     pagination_url(max_id: @statuses.last.id)
88 104
   end
89 105
 
@@ -92,7 +108,9 @@ class AccountsController < ApplicationController
92 108
   end
93 109
 
94 110
   def pagination_url(max_id: nil, min_id: nil)
95
-    if media_requested?
111
+    if tag_requested?
112
+      short_account_tag_url(@account, params[:tag], max_id: max_id, min_id: min_id)
113
+    elsif media_requested?
96 114
       short_account_media_url(@account, max_id: max_id, min_id: min_id)
97 115
     elsif replies_requested?
98 116
       short_account_with_replies_url(@account, max_id: max_id, min_id: min_id)
@@ -109,6 +127,10 @@ class AccountsController < ApplicationController
109 127
     request.path.ends_with?('/with_replies')
110 128
   end
111 129
 
130
+  def tag_requested?
131
+    request.path.ends_with?(Addressable::URI.parse("/tagged/#{params[:tag]}").normalize)
132
+  end
133
+
112 134
   def filtered_status_page(params)
113 135
     if params[:min_id].present?
114 136
       filtered_statuses.paginate_by_min_id(PAGE_SIZE, params[:min_id]).reverse

+ 11
- 5
app/controllers/activitypub/collections_controller.rb View File

@@ -6,13 +6,19 @@ class ActivityPub::CollectionsController < Api::BaseController
6 6
   before_action :set_account
7 7
   before_action :set_size
8 8
   before_action :set_statuses
9
+  before_action :set_cache_headers
9 10
 
10 11
   def show
11
-    render json: collection_presenter,
12
-           serializer: ActivityPub::CollectionSerializer,
13
-           adapter: ActivityPub::Adapter,
14
-           content_type: 'application/activity+json',
15
-           skip_activities: true
12
+    skip_session!
13
+
14
+    render_cached_json(['activitypub', 'collection', @account, params[:id]], content_type: 'application/activity+json') do
15
+      ActiveModelSerializers::SerializableResource.new(
16
+        collection_presenter,
17
+        serializer: ActivityPub::CollectionSerializer,
18
+        adapter: ActivityPub::Adapter,
19
+        skip_activities: true
20
+      )
21
+    end
16 22
   end
17 23
 
18 24
   private

+ 16
- 3
app/controllers/activitypub/inboxes_controller.rb View File

@@ -2,11 +2,14 @@
2 2
 
3 3
 class ActivityPub::InboxesController < Api::BaseController
4 4
   include SignatureVerification
5
+  include JsonLdHelper
5 6
 
6 7
   before_action :set_account
7 8
 
8 9
   def create
9
-    if signed_request_account
10
+    if unknown_deleted_account?
11
+      head 202
12
+    elsif signed_request_account
10 13
       upgrade_account
11 14
       process_payload
12 15
       head 202
@@ -17,12 +20,22 @@ class ActivityPub::InboxesController < Api::BaseController
17 20
 
18 21
   private
19 22
 
23
+  def unknown_deleted_account?
24
+    json = Oj.load(body, mode: :strict)
25
+    json['type'] == 'Delete' && json['actor'].present? && json['actor'] == value_or_id(json['object']) && !Account.where(uri: json['actor']).exists?
26
+  rescue Oj::ParseError
27
+    false
28
+  end
29
+
20 30
   def set_account
21 31
     @account = Account.find_local!(params[:account_username]) if params[:account_username]
22 32
   end
23 33
 
24 34
   def body
25
-    @body ||= request.body.read
35
+    return @body if defined?(@body)
36
+    @body = request.body.read.force_encoding('UTF-8')
37
+    request.body.rewind if request.body.respond_to?(:rewind)
38
+    @body
26 39
   end
27 40
 
28 41
   def upgrade_account
@@ -36,6 +49,6 @@ class ActivityPub::InboxesController < Api::BaseController
36 49
   end
37 50
 
38 51
   def process_payload
39
-    ActivityPub::ProcessingWorker.perform_async(signed_request_account.id, body.force_encoding('UTF-8'), @account&.id)
52
+    ActivityPub::ProcessingWorker.perform_async(signed_request_account.id, body, @account&.id)
40 53
   end
41 54
 end

+ 6
- 0
app/controllers/activitypub/outboxes_controller.rb View File

@@ -7,8 +7,14 @@ class ActivityPub::OutboxesController < Api::BaseController
7 7
 
8 8
   before_action :set_account
9 9
   before_action :set_statuses
10
+  before_action :set_cache_headers
10 11
 
11 12
   def show
13
+    unless page_requested?
14
+      skip_session!
15
+      expires_in 1.minute, public: true
16
+    end
17
+
12 18
     render json: outbox_presenter, serializer: ActivityPub::OutboxSerializer, adapter: ActivityPub::Adapter, content_type: 'application/activity+json'
13 19
   end
14 20
 

+ 15
- 2
app/controllers/admin/accounts_controller.rb View File

@@ -2,9 +2,9 @@
2 2
 
3 3
 module Admin
4 4
   class AccountsController < BaseController
5
-    before_action :set_account, only: [:show, :subscribe, :unsubscribe, :redownload, :remove_avatar, :remove_header, :enable, :unsilence, :unsuspend, :memorialize]
5
+    before_action :set_account, only: [:show, :subscribe, :unsubscribe, :redownload, :remove_avatar, :remove_header, :enable, :unsilence, :unsuspend, :memorialize, :approve, :reject]
6 6
     before_action :require_remote_account!, only: [:subscribe, :unsubscribe, :redownload]
7
-    before_action :require_local_account!, only: [:enable, :memorialize]
7
+    before_action :require_local_account!, only: [:enable, :memorialize, :approve, :reject]
8 8
 
9 9
     def index
10 10
       authorize :account, :index?
@@ -45,6 +45,18 @@ module Admin
45 45
       redirect_to admin_account_path(@account.id)
46 46
     end
47 47
 
48
+    def approve
49
+      authorize @account.user, :approve?
50
+      @account.user.approve!
51
+      redirect_to admin_accounts_path(pending: '1')
52
+    end
53
+
54
+    def reject
55
+      authorize @account.user, :reject?
56
+      SuspendAccountService.new.call(@account, including_user: true, destroy: true, skip_distribution: true)
57
+      redirect_to admin_accounts_path(pending: '1')
58
+    end
59
+
48 60
     def unsilence
49 61
       authorize @account, :unsilence?
50 62
       @account.unsilence!
@@ -114,6 +126,7 @@ module Admin
114 126
         :remote,
115 127
         :by_domain,
116 128
         :active,
129
+        :pending,
117 130
         :silenced,
118 131
         :suspended,
119 132
         :username,

+ 2
- 1
app/controllers/admin/dashboard_controller.rb View File

@@ -10,7 +10,7 @@ module Admin
10 10
       @interactions_week     = Redis.current.get("activity:interactions:#{current_week}") || 0
11 11
       @relay_enabled         = Relay.enabled.exists?
12 12
       @single_user_mode      = Rails.configuration.x.single_user_mode
13
-      @registrations_enabled = Setting.open_registrations
13
+      @registrations_enabled = Setting.registrations_mode != 'none'
14 14
       @deletions_enabled     = Setting.open_deletion
15 15
       @invites_enabled       = Setting.min_invite_role == 'user'
16 16
       @search_enabled        = Chewy.enabled?
@@ -29,6 +29,7 @@ module Admin
29 29
       @hidden_service        = ENV['ALLOW_ACCESS_TO_HIDDEN_SERVICE'] == 'true'
30 30
       @trending_hashtags     = TrendingTags.get(7)
31 31
       @profile_directory     = Setting.profile_directory
32
+      @timeline_preview      = Setting.timeline_preview
32 33
     end
33 34
 
34 35
     private

+ 52
- 0
app/controllers/admin/pending_accounts_controller.rb View File

@@ -0,0 +1,52 @@
1
+# frozen_string_literal: true
2
+
3
+module Admin
4
+  class PendingAccountsController < BaseController
5
+    before_action :set_accounts, only: :index
6
+
7
+    def index
8
+      @form = Form::AccountBatch.new
9
+    end
10
+
11
+    def batch
12
+      @form = Form::AccountBatch.new(form_account_batch_params.merge(current_account: current_account, action: action_from_button))
13
+      @form.save
14
+    rescue ActionController::ParameterMissing
15
+      flash[:alert] = I18n.t('admin.accounts.no_account_selected')
16
+    ensure
17
+      redirect_to admin_pending_accounts_path(current_params)
18
+    end
19
+
20
+    def approve_all
21
+      Form::AccountBatch.new(current_account: current_account, account_ids: User.pending.pluck(:account_id), action: 'approve').save
22
+      redirect_to admin_pending_accounts_path(current_params)
23
+    end
24
+
25
+    def reject_all
26
+      Form::AccountBatch.new(current_account: current_account, account_ids: User.pending.pluck(:account_id), action: 'reject').save
27
+      redirect_to admin_pending_accounts_path(current_params)
28
+    end
29
+
30
+    private
31
+
32
+    def set_accounts
33
+      @accounts = Account.joins(:user).merge(User.pending.recent).includes(user: :invite_request).page(params[:page])
34
+    end
35
+
36
+    def form_account_batch_params
37
+      params.require(:form_account_batch).permit(:action, account_ids: [])
38
+    end
39
+
40
+    def action_from_button
41
+      if params[:approve]
42
+        'approve'
43
+      elsif params[:reject]
44
+        'reject'
45
+      end
46
+    end
47
+
48
+    def current_params
49
+      params.slice(:page).permit(:page)
50
+    end
51
+  end
52
+end

+ 9
- 65
app/controllers/admin/settings_controller.rb View File

@@ -2,85 +2,29 @@
2 2
 
3 3
 module Admin
4 4
   class SettingsController < BaseController
5
-    ADMIN_SETTINGS = %w(
6
-      site_contact_username
7
-      site_contact_email
8
-      site_title
9
-      site_short_description
10
-      site_description
11
-      site_extended_description
12
-      site_terms
13
-      open_registrations
14
-      closed_registrations_message
15
-      open_deletion
16
-      timeline_preview
17
-      show_staff_badge
18
-      bootstrap_timeline_accounts
19
-      theme
20
-      thumbnail
21
-      hero
22
-      mascot
23
-      min_invite_role
24
-      activity_api_enabled
25
-      peers_api_enabled
26
-      show_known_fediverse_at_about_page
27
-      preview_sensitive_media
28
-      custom_css
29
-      profile_directory
30
-    ).freeze
31
-
32
-    BOOLEAN_SETTINGS = %w(
33
-      open_registrations
34
-      open_deletion
35
-      timeline_preview
36
-      show_staff_badge
37
-      activity_api_enabled
38
-      peers_api_enabled
39
-      show_known_fediverse_at_about_page
40
-      preview_sensitive_media
41
-      profile_directory
42
-    ).freeze
43
-
44
-    UPLOAD_SETTINGS = %w(
45
-      thumbnail
46
-      hero
47
-      mascot
48
-    ).freeze
49
-
50 5
     def edit
51 6
       authorize :settings, :show?
7
+
52 8
       @admin_settings = Form::AdminSettings.new
53 9
     end
54 10
 
55 11
     def update
56 12
       authorize :settings, :update?
57 13
 
58
-      settings_params.each do |key, value|
59
-        if UPLOAD_SETTINGS.include?(key)
60
-          upload = SiteUpload.where(var: key).first_or_initialize(var: key)
61
-          upload.update(file: value)
62
-        else
63
-          setting = Setting.where(var: key).first_or_initialize(var: key)
64
-          setting.update(value: value_for_update(key, value))
65
-        end
66
-      end
14
+      @admin_settings = Form::AdminSettings.new(settings_params)
67 15
 
68
-      flash[:notice] = I18n.t('generic.changes_saved_msg')
69
-      redirect_to edit_admin_settings_path
16
+      if @admin_settings.save
17
+        flash[:notice] = I18n.t('generic.changes_saved_msg')
18
+        redirect_to edit_admin_settings_path
19
+      else
20
+        render :edit
21
+      end
70 22
     end
71 23
 
72 24
     private
73 25
 
74 26
     def settings_params
75
-      params.require(:form_admin_settings).permit(ADMIN_SETTINGS)
76
-    end
77
-
78
-    def value_for_update(key, value)
79
-      if BOOLEAN_SETTINGS.include?(key)
80
-        value == '1'
81
-      else
82
-        value
83
-      end
27
+      params.require(:form_admin_settings).permit(*Form::AdminSettings::KEYS)
84 28
     end
85 29
   end
86 30
 end

+ 3
- 1
app/controllers/api/base_controller.rb View File

@@ -73,7 +73,9 @@ class Api::BaseController < ApplicationController
73 73
     elsif current_user.disabled?
74 74
       render json: { error: 'Your login is currently disabled' }, status: 403
75 75
     elsif !current_user.confirmed?
76
-      render json: { error: 'Email confirmation is not completed' }, status: 403
76
+      render json: { error: 'Your login is missing a confirmed e-mail address' }, status: 403
77
+    elsif !current_user.approved?
78
+      render json: { error: 'Your login is currently pending approval' }, status: 403
77 79
     else
78 80
       set_user_activity
79 81
     end

+ 30
- 0
app/controllers/api/proofs_controller.rb View File

@@ -0,0 +1,30 @@
1
+# frozen_string_literal: true
2
+
3
+class Api::ProofsController < Api::BaseController
4
+  before_action :set_account
5
+  before_action :set_provider
6
+  before_action :check_account_approval
7
+  before_action :check_account_suspension
8
+
9
+  def index
10
+    render json: @account, serializer: @provider.serializer_class
11
+  end
12
+
13
+  private
14
+
15
+  def set_provider
16
+    @provider = ProofProvider.find(params[:provider]) || raise(ActiveRecord::RecordNotFound)
17
+  end
18
+
19
+  def set_account
20
+    @account = Account.find_local!(params[:username])
21
+  end
22
+
23
+  def check_account_approval
24
+    not_found if @account.user_pending?
25
+  end
26
+
27
+  def check_account_suspension
28
+    gone if @account.suspended?
29
+  end
30
+end

+ 5
- 1
app/controllers/api/v1/accounts/follower_accounts_controller.rb View File

@@ -19,11 +19,15 @@ class Api::V1::Accounts::FollowerAccountsController < Api::BaseController
19 19
   end
20 20
 
21 21
   def load_accounts
22
-    return [] if @account.user_hides_network? && current_account.id != @account.id
22
+    return [] if hide_results?
23 23
 
24 24
     default_accounts.merge(paginated_follows).to_a
25 25
   end
26 26
 
27
+  def hide_results?
28
+    (@account.user_hides_network? && current_account.id != @account.id) || (current_account && @account.blocking?(current_account))
29
+  end
30
+
27 31
   def default_accounts
28 32
     Account.includes(:active_relationships, :account_stat).references(:active_relationships)
29 33
   end

+ 5
- 1
app/controllers/api/v1/accounts/following_accounts_controller.rb View File

@@ -19,11 +19,15 @@ class Api::V1::Accounts::FollowingAccountsController < Api::BaseController
19 19
   end
20 20
 
21 21
   def load_accounts
22
-    return [] if @account.user_hides_network? && current_account.id != @account.id
22
+    return [] if hide_results?
23 23
 
24 24
     default_accounts.merge(paginated_follows).to_a
25 25
   end
26 26
 
27
+  def hide_results?
28
+    (@account.user_hides_network? && current_account.id != @account.id) || (current_account && @account.blocking?(current_account))
29
+  end
30
+
27 31
   def default_accounts
28 32
     Account.includes(:passive_relationships, :account_stat).references(:passive_relationships)
29 33
   end

+ 19
- 0
app/controllers/api/v1/accounts/identity_proofs_controller.rb View File

@@ -0,0 +1,19 @@
1
+# frozen_string_literal: true
2
+
3
+class Api::V1::Accounts::IdentityProofsController < Api::BaseController
4
+  before_action :require_user!
5
+  before_action :set_account
6
+
7
+  respond_to :json
8
+
9
+  def index
10
+    @proofs = @account.identity_proofs.active
11
+    render json: @proofs, each_serializer: REST::IdentityProofSerializer
12
+  end
13
+
14
+  private
15
+
16
+  def set_account
17
+    @account = Account.find(params[:account_id])
18
+  end
19
+end

+ 3
- 2
app/controllers/api/v1/accounts/search_controller.rb View File

@@ -16,10 +16,11 @@ class Api::V1::Accounts::SearchController < Api::BaseController
16 16
   def account_search
17 17
     AccountSearchService.new.call(
18 18
       params[:q],
19
-      limit_param(DEFAULT_ACCOUNTS_LIMIT),
20 19
       current_account,
20
+      limit: limit_param(DEFAULT_ACCOUNTS_LIMIT),
21 21
       resolve: truthy_param?(:resolve),
22
-      following: truthy_param?(:following)
22
+      following: truthy_param?(:following),
23
+      offset: params[:offset]
23 24
     )
24 25
   end
25 26
 end

+ 11
- 0
app/controllers/api/v1/accounts/statuses_controller.rb View File

@@ -33,6 +33,7 @@ class Api::V1::Accounts::StatusesController < Api::BaseController
33 33
     statuses.merge!(only_media_scope) if truthy_param?(:only_media)
34 34
     statuses.merge!(no_replies_scope) if truthy_param?(:exclude_replies)
35 35
     statuses.merge!(no_reblogs_scope) if truthy_param?(:exclude_reblogs)
36
+    statuses.merge!(hashtag_scope)    if params[:tagged].present?
36 37
 
37 38
     statuses
38 39
   end
@@ -67,6 +68,16 @@ class Api::V1::Accounts::StatusesController < Api::BaseController
67 68
     Status.without_reblogs
68 69
   end
69 70
 
71
+  def hashtag_scope
72
+    tag = Tag.find_normalized(params[:tagged])
73
+
74
+    if tag
75
+      Status.tagged_with(tag.id)
76
+    else
77
+      Status.none
78
+    end
79
+  end
80
+
70 81
   def pagination_params(core_params)
71 82
     params.slice(:limit, :only_media, :exclude_replies).permit(:limit, :only_media, :exclude_replies).merge(core_params)
72 83
   end

+ 5
- 1
app/controllers/api/v1/accounts_controller.rb View File

@@ -80,6 +80,10 @@ class Api::V1::AccountsController < Api::BaseController
80 80
   end
81 81
 
82 82
   def check_enabled_registrations
83
-    forbidden if single_user_mode? || !Setting.open_registrations
83
+    forbidden if single_user_mode? || !allowed_registrations?
84
+  end
85
+
86
+  def allowed_registrations?
87
+    Setting.registrations_mode != 'none'
84 88
   end
85 89
 end

+ 29
- 0
app/controllers/api/v1/polls/votes_controller.rb View File

@@ -0,0 +1,29 @@
1
+# frozen_string_literal: true
2
+
3
+class Api::V1::Polls::VotesController < Api::BaseController
4
+  include Authorization
5
+
6
+  before_action -> { doorkeeper_authorize! :write, :'write:statuses' }
7
+  before_action :require_user!
8
+  before_action :set_poll
9
+
10
+  respond_to :json
11
+
12
+  def create
13
+    VoteService.new.call(current_account, @poll, vote_params[:choices])
14
+    render json: @poll, serializer: REST::PollSerializer
15
+  end
16
+
17
+  private
18
+
19
+  def set_poll
20
+    @poll = Poll.attached.find(params[:poll_id])
21
+    authorize @poll.status, :show?
22
+  rescue Mastodon::NotPermittedError
23
+    raise ActiveRecord::RecordNotFound
24
+  end
25
+
26
+  def vote_params
27
+    params.permit(choices: [])
28
+  end
29
+end

+ 13
- 0
app/controllers/api/v1/polls_controller.rb View File

@@ -0,0 +1,13 @@
1
+# frozen_string_literal: true
2
+
3
+class Api::V1::PollsController < Api::BaseController
4
+  before_action -> { authorize_if_got_token! :read, :'read:statuses' }, only: :show
5
+
6
+  respond_to :json
7
+
8
+  def show
9
+    @poll = Poll.attached.find(params[:id])
10
+    ActivityPub::FetchRemotePollService.new.call(@poll, current_account) if user_signed_in? && @poll.possibly_stale?
11
+    render json: @poll, serializer: REST::PollSerializer, include_results: true
12
+  end
13
+end

+ 12
- 0
app/controllers/api/v1/preferences_controller.rb View File

@@ -0,0 +1,12 @@
1
+# frozen_string_literal: true
2
+
3
+class Api::V1::PreferencesController < Api::BaseController
4
+  before_action -> { doorkeeper_authorize! :read, :'read:accounts' }
5
+  before_action :require_user!
6
+
7
+  respond_to :json
8
+
9
+  def index
10
+    render json: current_account, serializer: REST::PreferencesSerializer
11
+  end
12
+end

+ 9
- 17
app/controllers/api/v1/search_controller.rb View File

@@ -3,7 +3,7 @@
3 3
 class Api::V1::SearchController < Api::BaseController
4 4
   include Authorization
5 5
 
6
-  RESULTS_LIMIT = 5
6
+  RESULTS_LIMIT = 20
7 7
 
8 8
   before_action -> { doorkeeper_authorize! :read, :'read:search' }
9 9
   before_action :require_user!
@@ -11,30 +11,22 @@ class Api::V1::SearchController < Api::BaseController
11 11
   respond_to :json
12 12
 
13 13
   def index
14
-    @search = Search.new(search)
14
+    @search = Search.new(search_results)
15 15
     render json: @search, serializer: REST::SearchSerializer
16 16
   end
17 17
 
18 18
   private
19 19
 
20
-  def search
21
-    search_results.tap do |search|
22
-      search[:statuses].keep_if do |status|
23
-        begin
24
-          authorize status, :show?
25
-        rescue Mastodon::NotPermittedError
26
-          false
27
-        end
28
-      end
29
-    end
30
-  end
31
-
32 20
   def search_results
33 21
     SearchService.new.call(
34 22
       params[:q],
35
-      RESULTS_LIMIT,
36
-      truthy_param?(:resolve),
37
-      current_account
23
+      current_account,
24
+      limit_param(RESULTS_LIMIT),
25
+      search_params.merge(resolve: truthy_param?(:resolve))
38 26
     )
39 27
   end
28
+
29
+  def search_params
30
+    params.permit(:type, :offset, :min_id, :max_id, :account_id)
31
+  end
40 32
 end

+ 5
- 1
app/controllers/api/v1/statuses/reblogs_controller.rb View File

<
@@ -9,7 +9,7 @@ class Api::V1::Statuses::ReblogsController < Api::BaseController
9 9
   respond_to :json
10 10
 
11