From 7853be1f06e2a22582cf664a0957f98c46e00a6d Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sun, 17 Feb 2019 20:24:12 +0100 Subject: [PATCH 1/7] Bump version to 2.7.2 (#10067) --- AUTHORS.md | 70 +++++++++++++++++++++++------------------ CHANGELOG.md | 41 ++++++++++++++++++++++++ lib/mastodon/version.rb | 2 +- 3 files changed, 82 insertions(+), 31 deletions(-) diff --git a/AUTHORS.md b/AUTHORS.md index 1bcf455b1..3171214e0 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -9,18 +9,18 @@ and provided thanks to the work of the following contributors: * [akihikodaki](https://github.com/akihikodaki) * [ThibG](https://github.com/ThibG) * [mjankowski](https://github.com/mjankowski) +* [dependabot[bot]](https://github.com/apps/dependabot) * [unarist](https://github.com/unarist) * [m4sk1n](https://github.com/m4sk1n) -* [dependabot[bot]](https://github.com/apps/dependabot) * [yiskah](https://github.com/yiskah) * [nolanlawson](https://github.com/nolanlawson) -* [sorin-davidoi](https://github.com/sorin-davidoi) * [ysksn](https://github.com/ysksn) +* [sorin-davidoi](https://github.com/sorin-davidoi) * [abcang](https://github.com/abcang) * [lynlynlynx](https://github.com/lynlynlynx) -* [alpaca-tc](https://github.com/alpaca-tc) * [mayaeh](https://github.com/mayaeh) * [renatolond](https://github.com/renatolond) +* [alpaca-tc](https://github.com/alpaca-tc) * [nclm](https://github.com/nclm) * [ineffyble](https://github.com/ineffyble) * [jeroenpraat](https://github.com/jeroenpraat) @@ -28,9 +28,9 @@ and provided thanks to the work of the following contributors: * [Quent-in](https://github.com/Quent-in) * [JantsoP](https://github.com/JantsoP) * [mabkenar](https://github.com/mabkenar) +* [Kjwon15](https://github.com/Kjwon15) * [nullkal](https://github.com/nullkal) * [yookoala](https://github.com/yookoala) -* [Kjwon15](https://github.com/Kjwon15) * [shuheiktgw](https://github.com/shuheiktgw) * [ashfurrow](https://github.com/ashfurrow) * [Quenty31](https://github.com/Quenty31) @@ -48,16 +48,16 @@ and provided thanks to the work of the following contributors: * [rkarabut](https://github.com/rkarabut) * [yukimochi](https://github.com/yukimochi) * [Artoria2e5](https://github.com/Artoria2e5) +* [nightpool](https://github.com/nightpool) * [marrus-sh](https://github.com/marrus-sh) * [krainboltgreene](https://github.com/krainboltgreene) -* [patf](https://github.com/patf) +* [pfigel](https://github.com/pfigel) * [Aldarone](https://github.com/Aldarone) * [BoFFire](https://github.com/BoFFire) * [clworld](https://github.com/clworld) * [dracos](https://github.com/dracos) * [SerCom_KC](mailto:sercom-kc@users.noreply.github.com) * [Sylvhem](https://github.com/Sylvhem) -* [nightpool](https://github.com/nightpool) * [MasterGroosha](https://github.com/MasterGroosha) * [JeanGauthier](https://github.com/JeanGauthier) * [kschaper](https://github.com/kschaper) @@ -77,11 +77,14 @@ and provided thanks to the work of the following contributors: * [johnsudaar](https://github.com/johnsudaar) * [trebmuh](https://github.com/trebmuh) * [Rakib Hasan](mailto:rmhasan@gmail.com) +* [ashleyhull-versent](https://github.com/ashleyhull-versent) * [lindwurm](https://github.com/lindwurm) * [victorhck](mailto:victorhck@geeko.site) * [voidsatisfaction](https://github.com/voidsatisfaction) +* [rinsuki](https://github.com/rinsuki) * [hikari-no-yume](https://github.com/hikari-no-yume) * [angristan](https://github.com/angristan) +* [hinaloe](https://github.com/hinaloe) * [seefood](https://github.com/seefood) * [jackjennings](https://github.com/jackjennings) * [spla](mailto:spla@mastodont.cat) @@ -92,20 +95,20 @@ and provided thanks to the work of the following contributors: * [dunn](https://github.com/dunn) * [xqus](https://github.com/xqus) * [hugogameiro](https://github.com/hugogameiro) +* [ariasuni](https://github.com/ariasuni) * [pfm-eyesightjp](https://github.com/pfm-eyesightjp) * [fakenine](https://github.com/fakenine) * [tsuwatch](https://github.com/tsuwatch) * [victorhck](https://github.com/victorhck) -* [ashleyhull-versent](https://github.com/ashleyhull-versent) * [kedamaDQ](https://github.com/kedamaDQ) * [puckipedia](https://github.com/puckipedia) * [fvh-P](https://github.com/fvh-P) * [contraexemplo](https://github.com/contraexemplo) +* [Aditoo17](https://github.com/Aditoo17) * [kazu9su](https://github.com/kazu9su) * [Komic](https://github.com/Komic) * [lmorchard](https://github.com/lmorchard) * [diomed](https://github.com/diomed) -* [ariasuni](https://github.com/ariasuni) * [Neetshin](mailto:neetshin@neetsh.in) * [rainyday](https://github.com/rainyday) * [ProgVal](https://github.com/ProgVal) @@ -114,7 +117,8 @@ and provided thanks to the work of the following contributors: * [goofy-bz](mailto:goofy@babelzilla.org) * [kadiix](https://github.com/kadiix) * [kodacs](https://github.com/kodacs) -* [rtucker](https://github.com/rtucker) +* [trwnh](https://github.com/trwnh) +* [JMendyk](https://github.com/JMendyk) * [KScl](https://github.com/KScl) * [sterdev](https://github.com/sterdev) * [TheKinrar](https://github.com/TheKinrar) @@ -125,16 +129,16 @@ and provided thanks to the work of the following contributors: * [fhemberger](https://github.com/fhemberger) * [greysteil](https://github.com/greysteil) * [hensmith](https://github.com/hensmith) -* [hinaloe](https://github.com/hinaloe) * [d6rkaiz](https://github.com/d6rkaiz) * [Reverite](https://github.com/Reverite) -* [JMendyk](https://github.com/JMendyk) * [JohnD28](https://github.com/JohnD28) * [znz](https://github.com/znz) * [Naouak](https://github.com/Naouak) * [pawelngei](https://github.com/pawelngei) +* [rtucker](https://github.com/rtucker) * [reneklacan](https://github.com/reneklacan) * [ekiru](https://github.com/ekiru) +* [noellabo](https://github.com/noellabo) * [tcitworld](https://github.com/tcitworld) * [geta6](https://github.com/geta6) * [happycoloredbanana](https://github.com/happycoloredbanana) @@ -144,9 +148,9 @@ and provided thanks to the work of the following contributors: * [noraworld](https://github.com/noraworld) * [theboss](https://github.com/theboss) * [178inaba](https://github.com/178inaba) -* [Aditoo17](https://github.com/Aditoo17) * [alyssais](https://github.com/alyssais) -* [kodnaplakal](https://github.com/kodnaplakal) +* [hiphref](https://github.com/hiphref) +* [BenLubar](https://github.com/BenLubar) * [stalker314314](https://github.com/stalker314314) * [huertanix](https://github.com/huertanix) * [genesixx](https://github.com/genesixx) @@ -157,6 +161,7 @@ and provided thanks to the work of the following contributors: * [kmichl](https://github.com/kmichl) * [Kurtis Rainbolt-Greene](mailto:me@kurtisrainboltgreene.name) * [saper](https://github.com/saper) +* [marek-lach](https://github.com/marek-lach) * [nevillepark](https://github.com/nevillepark) * [ornithocoder](https://github.com/ornithocoder) * [pierreozoux](https://github.com/pierreozoux) @@ -164,7 +169,6 @@ and provided thanks to the work of the following contributors: * [Ram Lmn](mailto:ramlmn@users.noreply.github.com) * [harukasan](https://github.com/harukasan) * [stamak](https://github.com/stamak) -* [noellabo](https://github.com/noellabo) * [Technowix](mailto:technowix@users.noreply.github.com) * [Eychics](https://github.com/Eychics) * [Thor Harald Johansen](mailto:thj@thj.no) @@ -179,21 +183,20 @@ and provided thanks to the work of the following contributors: * [hoodie](mailto:hoodiekitten@outlook.com) * [luzi82](https://github.com/luzi82) * [duxovni](https://github.com/duxovni) -* [trwnh](https://github.com/trwnh) +* [tmm576](https://github.com/tmm576) * [unsmell](https://github.com/unsmell) * [valerauko](https://github.com/valerauko) * [chriswmartin](https://github.com/chriswmartin) * [vahnj](https://github.com/vahnj) * [ikuradon](https://github.com/ikuradon) * [AndreLewin](https://github.com/AndreLewin) -* [rinsuki](https://github.com/rinsuki) * [0xflotus](https://github.com/0xflotus) * [redtachyons](https://github.com/redtachyons) * [thurloat](https://github.com/thurloat) * [aaribaud](https://github.com/aaribaud) +* [pointlessone](https://github.com/pointlessone) * [Andrew](mailto:andrewlchronister@gmail.com) * [estuans](https://github.com/estuans) -* [BenLubar](https://github.com/BenLubar) * [dissolve](https://github.com/dissolve) * [PurpleBooth](https://github.com/PurpleBooth) * [bradurani](https://github.com/bradurani) @@ -216,6 +219,7 @@ and provided thanks to the work of the following contributors: * [ErikXXon](https://github.com/ErikXXon) * [ian-kelling](https://github.com/ian-kelling) * [immae](https://github.com/immae) +* [J0WI](https://github.com/J0WI) * [foozmeat](https://github.com/foozmeat) * [jasonrhodes](https://github.com/jasonrhodes) * [Jason Snell](mailto:jason@newrelic.com) @@ -230,6 +234,7 @@ and provided thanks to the work of the following contributors: * [Lorenz Diener](mailto:halcyon@icosahedron.website) * [alimony](https://github.com/alimony) * [mig5](https://github.com/mig5) +* [moritzheiber](https://github.com/moritzheiber) * [ndarville](https://github.com/ndarville) * [Abzol](https://github.com/Abzol) * [pwoolcoc](https://github.com/pwoolcoc) @@ -238,6 +243,7 @@ and provided thanks to the work of the following contributors: * [ignisf](https://github.com/ignisf) * [raymestalez](https://github.com/raymestalez) * [remram44](https://github.com/remram44) +* [sts10](https://github.com/sts10) * [sascha-sl](https://github.com/sascha-sl) * [u1-liquid](https://github.com/u1-liquid) * [sim6](https://github.com/sim6) @@ -288,6 +294,7 @@ and provided thanks to the work of the following contributors: * [857b](https://github.com/857b) * [insom](https://github.com/insom) * [tachyons](https://github.com/tachyons) +* [acid-chicken](https://github.com/acid-chicken) * [Esteth](https://github.com/Esteth) * [unascribed](https://github.com/unascribed) * [Aguay-val](https://github.com/Aguay-val) @@ -297,7 +304,6 @@ and provided thanks to the work of the following contributors: * [unleashed](https://github.com/unleashed) * [alxrcs](https://github.com/alxrcs) * [console-cowboy](https://github.com/console-cowboy) -* [pointlessone](https://github.com/pointlessone) * [Alkarex](https://github.com/Alkarex) * [a2](https://github.com/a2) * [0xa](https://github.com/0xa) @@ -329,6 +335,7 @@ and provided thanks to the work of the following contributors: * [Motoma](https://github.com/Motoma) * [chriswk](https://github.com/chriswk) * [csu](https://github.com/csu) +* [clarcharr](https://github.com/clarcharr) * [kklleemm](https://github.com/kklleemm) * [colindean](https://github.com/colindean) * [dachinat](https://github.com/dachinat) @@ -356,6 +363,7 @@ and provided thanks to the work of the following contributors: * [espenronnevik](https://github.com/espenronnevik) * [Finariel](https://github.com/Finariel) * [siuying](https://github.com/siuying) +* [zoc](https://github.com/zoc) * [fwenzel](https://github.com/fwenzel) * [GenbuHase](https://github.com/GenbuHase) * [hattori6789](https://github.com/hattori6789) @@ -416,6 +424,7 @@ and provided thanks to the work of the following contributors: * [martymcguire](https://github.com/martymcguire) * [marvinkopf](https://github.com/marvinkopf) * [otsune](https://github.com/otsune) +* [mbugowski](https://github.com/mbugowski) * [Mathias B](mailto:10813340+mathias-b@users.noreply.github.com) * [matt-auckland](https://github.com/matt-auckland) * [webroo](https://github.com/webroo) @@ -434,7 +443,6 @@ and provided thanks to the work of the following contributors: * [premist](https://github.com/premist) * [Mnkai](https://github.com/Mnkai) * [mitchhentges](https://github.com/mitchhentges) -* [moritzheiber](https://github.com/moritzheiber) * [mouse-reeve](https://github.com/mouse-reeve) * [Mozinet-fr](https://github.com/Mozinet-fr) * [lae](https://github.com/lae) @@ -458,17 +466,17 @@ and provided thanks to the work of the following contributors: * [Pangoraw](https://github.com/Pangoraw) * [peterkeen](https://github.com/peterkeen) * [pgate](https://github.com/pgate) -* [retokromer](https://github.com/retokromer) -* [rfwatson](https://github.com/rfwatson) -* [rfreebern](https://github.com/rfreebern) +* [Reto Kromer](mailto:retokromer@users.noreply.github.com) +* [Rey Tucker](mailto:git@reytucker.us) +* [Rob Watson](mailto:rfwatson@users.noreply.github.com) +* [Ryan Freebern](mailto:ryan@freebern.org) * [Ryan Wade](mailto:ryan.wade@protonmail.com) -* [sylph01](https://github.com/sylph01) -* [S-H-GAMELINKS](https://github.com/S-H-GAMELINKS) -* [staticsafe](https://github.com/staticsafe) -* [snwh](https://github.com/snwh) -* [sts10](https://github.com/sts10) -* [skoji](https://github.com/skoji) -* [ScienJus](https://github.com/ScienJus) +* [Ryo Kajiwara](mailto:kfe-fecn6.prussian@s01.info) +* [S.H](mailto:gamelinks007@gmail.com) +* [Sadiq Saif](mailto:staticsafe@users.noreply.github.com) +* [Sam Hewitt](mailto:hewittsamuel@gmail.com) +* [Satoshi KOJIMA](mailto:skoji@mac.com) +* [ScienJus](mailto:i@scienjus.com) * [Scott Larkin](mailto:scott@codeclimate.com) * [Sebastian Hübner](mailto:imolein@users.noreply.github.com) * [Sebastian Morr](mailto:sebastian@morr.cc) @@ -483,6 +491,7 @@ and provided thanks to the work of the following contributors: * [Sir-Boops](mailto:admin@boops.me) * [Soshi Kato](mailto:mail@sossii.com) * [Spanky](mailto:2788886+spankyworks@users.noreply.github.com) +* [Stanislas](mailto:angristan@pm.me) * [StefOfficiel](mailto:pichard.stephane@free.fr) * [Steven Tappert](mailto:admin@dark-it.net) * [Svetlozar Todorov](mailto:svetlik@users.noreply.github.com) @@ -532,6 +541,7 @@ and provided thanks to the work of the following contributors: * [fsubal](mailto:fsubal@users.noreply.github.com) * [fusshi-](mailto:dikky1218@users.noreply.github.com) * [gentaro](mailto:gentaroooo@gmail.com) +* [gol-cha](mailto:info@mevo.xyz) * [hakoai](mailto:hk--76@qa2.so-net.ne.jp) * [haosbvnker](mailto:github@chaosbunker.com) * [isati](mailto:phil@juchnowi.cz) @@ -549,12 +559,12 @@ and provided thanks to the work of the following contributors: * [luzpaz](mailto:luzpaz@users.noreply.github.com) * [maxypy](mailto:maxime@mpigou.fr) * [mhe](mailto:mail@marcus-herrmann.com) +* [mike castleman](mailto:m@mlcastle.net) * [mimikun](mailto:dzdzble_effort_311@outlook.jp) * [mshrtkch](mailto:mshrtkch@users.noreply.github.com) * [muan](mailto:muan@github.com) * [namelessGonbai](mailto:43787036+namelessgonbai@users.noreply.github.com) * [neetshin](mailto:neetshin@neetsh.in) -* [nightpool](mailto:nightpool@users.noreply.github.com) * [rch850](mailto:rich850@gmail.com) * [roikale](mailto:roikale@users.noreply.github.com) * [rysiekpl](mailto:rysiek@hackerspace.pl) diff --git a/CHANGELOG.md b/CHANGELOG.md index cfb6b15f5..f3356d542 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,47 @@ Changelog All notable changes to this project will be documented in this file. +## [2.7.2] - 2019-02-17 +### Added + +- Add support for IPv6 in e-mail validation ([zoc](https://github.com/tootsuite/mastodon/pull/10009)) +- Add record of IP address used for signing up ([ThibG](https://github.com/tootsuite/mastodon/pull/10026)) +- Add tight rate-limit for API deletions (30 per 30 minutes) ([Gargron](https://github.com/tootsuite/mastodon/pull/10042)) +- Add support for embedded `Announce` objects attributed to the same actor ([ThibG](https://github.com/tootsuite/mastodon/pull/9998), [Gargron](https://github.com/tootsuite/mastodon/pull/10065)) +- Add spam filter for `Create` and `Announce` activities ([Gargron](https://github.com/tootsuite/mastodon/pull/10005), [Gargron](https://github.com/tootsuite/mastodon/pull/10041), [Gargron](https://github.com/tootsuite/mastodon/pull/10062)) +- Add `registrations` attribute to `GET /api/v1/instance` ([Gargron](https://github.com/tootsuite/mastodon/pull/10060)) +- Add `vapid_key` to `POST /api/v1/apps` and `GET /api/v1/apps/verify_credentials` ([Gargron](https://github.com/tootsuite/mastodon/pull/10058)) + +### Fixed + +- Fix link color and add link underlines in high-contrast theme ([Gargron](https://github.com/tootsuite/mastodon/pull/9949), [Gargron](https://github.com/tootsuite/mastodon/pull/10028)) +- Fix unicode characters in URLs not being linkified ([JMendyk](https://github.com/tootsuite/mastodon/pull/8447), [hinaloe](https://github.com/tootsuite/mastodon/pull/9991)) +- Fix URLs linkifier grabbing ending quotation as part of the link ([Gargron](https://github.com/tootsuite/mastodon/pull/9997)) +- Fix authorized applications page design ([rinsuki](https://github.com/tootsuite/mastodon/pull/9969)) +- Fix custom emojis not showing up in share page emoji picker ([rinsuki](https://github.com/tootsuite/mastodon/pull/9970)) +- Fix too liberal application of whitespace in toots ([trwnh](https://github.com/tootsuite/mastodon/pull/9968)) +- Fix misleading e-mail hint being displayed in admin view ([ThibG](https://github.com/tootsuite/mastodon/pull/9973)) +- Fix tombstones not being cleared out ([abcang](https://github.com/tootsuite/mastodon/pull/9978)) +- Fix some timeline jumps ([ThibG](https://github.com/tootsuite/mastodon/pull/9982), [ThibG](https://github.com/tootsuite/mastodon/pull/10001), [rinsuki](https://github.com/tootsuite/mastodon/pull/10046)) +- Fix content warning input taking keyboard focus even when hidden ([hinaloe](https://github.com/tootsuite/mastodon/pull/10017)) +- Fix hashtags select styling in default and high-contrast themes ([Gargron](https://github.com/tootsuite/mastodon/pull/10029)) +- Fix style regressions on landing page ([Gargron](https://github.com/tootsuite/mastodon/pull/10030)) +- Fix hashtag column not subscribing to stream on mount ([Gargron](https://github.com/tootsuite/mastodon/pull/10040)) +- Fix relay enabling/disabling not resetting inbox availability status ([Gargron](https://github.com/tootsuite/mastodon/pull/10048)) +- Fix mutes, blocks, domain blocks and follow requests not paginating ([Gargron](https://github.com/tootsuite/mastodon/pull/10057)) +- Fix crash on public hashtag pages when streaming fails ([ThibG](https://github.com/tootsuite/mastodon/pull/10061)) + +### Changed + +- Change icon for unlisted visibility level ([clarcharr](https://github.com/tootsuite/mastodon/pull/9952)) +- Change queue of actor deletes from push to pull for non-follower recipients ([ThibG](https://github.com/tootsuite/mastodon/pull/10016)) +- Change robots.txt to exclude media proxy URLs ([nightpool](https://github.com/tootsuite/mastodon/pull/10038)) +- Change upload description input to allow line breaks ([BenLubar](https://github.com/tootsuite/mastodon/pull/10036)) +- Change `dist/mastodon-streaming.service` to recommend running node without intermediary npm command ([nolanlawson](https://github.com/tootsuite/mastodon/pull/10032)) +- Change conversations to always show names of other participants ([Gargron](https://github.com/tootsuite/mastodon/pull/10047)) +- Change buttons on timeline preview to open the interaction dialog ([Gargron](https://github.com/tootsuite/mastodon/pull/10054)) +- Change error graphic to hover-to-play ([Gargron](https://github.com/tootsuite/mastodon/pull/10055)) + ## [2.7.1] - 2019-01-28 ### Fixed diff --git a/lib/mastodon/version.rb b/lib/mastodon/version.rb index cf32e2f63..81dd253ae 100644 --- a/lib/mastodon/version.rb +++ b/lib/mastodon/version.rb @@ -13,7 +13,7 @@ module Mastodon end def patch - 1 + 2 end def pre From d1d7d14f77733be2e0938488752e94d65eedc6aa Mon Sep 17 00:00:00 2001 From: ThibG Date: Mon, 18 Feb 2019 00:10:21 +0100 Subject: [PATCH 2/7] Fix video player width not being updated to fit container width (#10069) --- app/javascript/mastodon/features/video/index.js | 1 - 1 file changed, 1 deletion(-) diff --git a/app/javascript/mastodon/features/video/index.js b/app/javascript/mastodon/features/video/index.js index 894fe78d9..55dd249e1 100644 --- a/app/javascript/mastodon/features/video/index.js +++ b/app/javascript/mastodon/features/video/index.js @@ -347,7 +347,6 @@ class Video extends React.PureComponent { width = containerWidth; height = containerWidth / (16/9); - playerStyle.width = width; playerStyle.height = height; } From 2f7f6af26a40fb9981c99d131cf021c71f24fb99 Mon Sep 17 00:00:00 2001 From: ThibG Date: Mon, 18 Feb 2019 13:37:13 +0100 Subject: [PATCH 3/7] =?UTF-8?q?Hide=20domain=20filter=20in=20admin=20page?= =?UTF-8?q?=20when=20=E2=80=9Clocal=E2=80=9D=20filter=20is=20active=20(#10?= =?UTF-8?q?074)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since the “domain” field is ignored in this case. --- app/views/admin/accounts/index.html.haml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/views/admin/accounts/index.html.haml b/app/views/admin/accounts/index.html.haml index 91fddadf8..345f74f90 100644 --- a/app/views/admin/accounts/index.html.haml +++ b/app/views/admin/accounts/index.html.haml @@ -26,8 +26,9 @@ = hidden_field_tag key, params[key] - %i(username by_domain display_name email ip).each do |key| - .input.string.optional - = text_field_tag key, params[key], class: 'string optional', placeholder: I18n.t("admin.accounts.#{key}") + - unless key == :by_domain && params[:remote].blank? + .input.string.optional + = text_field_tag key, params[key], class: 'string optional', placeholder: I18n.t("admin.accounts.#{key}") .actions %button= t('admin.accounts.search') From 6840a77711b2d536b9227b5a96ec565117d80205 Mon Sep 17 00:00:00 2001 From: ThibG Date: Mon, 18 Feb 2019 14:59:19 +0100 Subject: [PATCH 4/7] Add domain search/filter to the "Federation" (/admin/instances) page (#10071) --- app/controllers/admin/instances_controller.rb | 2 +- app/helpers/admin/filter_helper.rb | 2 +- app/models/domain_block.rb | 2 ++ app/models/instance_filter.rb | 8 ++++++-- app/views/admin/instances/index.html.haml | 14 ++++++++++++++ config/locales/en.yml | 1 + 6 files changed, 25 insertions(+), 4 deletions(-) diff --git a/app/controllers/admin/instances_controller.rb b/app/controllers/admin/instances_controller.rb index 431ce6f4d..6dd659a30 100644 --- a/app/controllers/admin/instances_controller.rb +++ b/app/controllers/admin/instances_controller.rb @@ -38,7 +38,7 @@ module Admin end def filter_params - params.permit(:limited) + params.permit(:limited, :by_domain) end end end diff --git a/app/helpers/admin/filter_helper.rb b/app/helpers/admin/filter_helper.rb index 97beb587f..275b5f2fe 100644 --- a/app/helpers/admin/filter_helper.rb +++ b/app/helpers/admin/filter_helper.rb @@ -6,7 +6,7 @@ module Admin::FilterHelper INVITE_FILTER = %i(available expired).freeze CUSTOM_EMOJI_FILTERS = %i(local remote by_domain shortcode).freeze TAGS_FILTERS = %i(hidden).freeze - INSTANCES_FILTERS = %i(limited).freeze + INSTANCES_FILTERS = %i(limited by_domain).freeze FILTERS = ACCOUNT_FILTERS + REPORT_FILTERS + INVITE_FILTER + CUSTOM_EMOJI_FILTERS + TAGS_FILTERS + INSTANCES_FILTERS diff --git a/app/models/domain_block.rb b/app/models/domain_block.rb index 1064ea7c8..069cda367 100644 --- a/app/models/domain_block.rb +++ b/app/models/domain_block.rb @@ -24,6 +24,8 @@ class DomainBlock < ApplicationRecord has_many :accounts, foreign_key: :domain, primary_key: :domain delegate :count, to: :accounts, prefix: true + scope :matches_domain, ->(value) { where(arel_table[:domain].matches("%#{value}%")) } + def self.blocked?(domain) where(domain: domain, severity: :suspend).exists? end diff --git a/app/models/instance_filter.rb b/app/models/instance_filter.rb index 3483d8cd6..848fff53e 100644 --- a/app/models/instance_filter.rb +++ b/app/models/instance_filter.rb @@ -9,9 +9,13 @@ class InstanceFilter def results if params[:limited].present? - DomainBlock.order(id: :desc) + scope = DomainBlock + scope = scope.matches_domain(params[:by_domain]) if params[:by_domain].present? + scope.order(id: :desc) else - Account.remote.by_domain_accounts + scope = Account.remote + scope = scope.matches_domain(params[:by_domain]) if params[:by_domain].present? + scope.by_domain_accounts end end end diff --git a/app/views/admin/instances/index.html.haml b/app/views/admin/instances/index.html.haml index ce35b5db4..2a5af3b5d 100644 --- a/app/views/admin/instances/index.html.haml +++ b/app/views/admin/instances/index.html.haml @@ -11,6 +11,20 @@ %div{ style: 'flex: 1 1 auto; text-align: right' } = link_to t('admin.domain_blocks.add_new'), new_admin_domain_block_path, class: 'button' += form_tag admin_instances_url, method: 'GET', class: 'simple_form' do + .fields-group + - Admin::FilterHelper::INSTANCES_FILTERS.each do |key| + - if params[key].present? + = hidden_field_tag key, params[key] + + - %i(by_domain).each do |key| + .input.string.optional + = text_field_tag key, params[key], class: 'string optional', placeholder: I18n.t("admin.instances.#{key}") + + .actions + %button= t('admin.accounts.search') + = link_to t('admin.accounts.reset'), admin_custom_emojis_path, class: 'button negative' + %hr.spacer/ - @instances.each do |instance| diff --git a/config/locales/en.yml b/config/locales/en.yml index dacf16d56..7363a7457 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -302,6 +302,7 @@ en: back_to_account: Back To Account title: "%{acct}'s Followers" instances: + by_domain: Domain delivery_available: Delivery is available known_accounts: one: "%{count} known account" From 3a8cb6c73715919a61709bd7ce67fc5ec8d192f9 Mon Sep 17 00:00:00 2001 From: ThibG Date: Mon, 18 Feb 2019 14:59:46 +0100 Subject: [PATCH 5/7] Add quick link from admin account view to block/unblock instance (#10073) --- app/views/admin/accounts/show.html.haml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/views/admin/accounts/show.html.haml b/app/views/admin/accounts/show.html.haml index 280a834ba..7ac73bd07 100644 --- a/app/views/admin/accounts/show.html.haml +++ b/app/views/admin/accounts/show.html.haml @@ -166,6 +166,12 @@ - else = link_to t('admin.accounts.perform_full_suspension'), new_admin_account_action_path(@account.id, type: 'suspend'), class: 'button button--destructive' if can?(:suspend, @account) + - unless @account.local? + - if DomainBlock.where(domain: @account.domain).exists? + = link_to t('admin.domain_blocks.undo'), admin_instance_path(@account.domain), class: 'button' + - else + = link_to t('admin.domain_blocks.add_new'), new_admin_domain_block_path(_domain: @account.domain), class: 'button button--destructive' + %hr.spacer/ - unless @warnings.empty? From 359d26a05345895f295a91b7728fe711cd280f84 Mon Sep 17 00:00:00 2001 From: ThibG Date: Tue, 19 Feb 2019 14:01:22 +0100 Subject: [PATCH 6/7] =?UTF-8?q?Fix=20=E2=80=9Creset=E2=80=9D=20button=20of?= =?UTF-8?q?=20instance=20filter=20switching=20to=20custom=20emoji=20admin?= =?UTF-8?q?=20panel=20(#10076)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/admin/instances/index.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/admin/instances/index.html.haml b/app/views/admin/instances/index.html.haml index 2a5af3b5d..235927140 100644 --- a/app/views/admin/instances/index.html.haml +++ b/app/views/admin/instances/index.html.haml @@ -23,7 +23,7 @@ .actions %button= t('admin.accounts.search') - = link_to t('admin.accounts.reset'), admin_custom_emojis_path, class: 'button negative' + = link_to t('admin.accounts.reset'), admin_instances_path, class: 'button negative' %hr.spacer/ From 8e7fc7ec73c0743df378403ad2e704c9fae70400 Mon Sep 17 00:00:00 2001 From: ThibG Date: Tue, 19 Feb 2019 20:00:41 +0100 Subject: [PATCH 7/7] Fix crash when conversations have no valid participants (#10078) * Never return empty participants for conversations Fixes #10068 * Fix client-side crash when conversations have no participants --- app/javascript/mastodon/components/display_name.js | 2 +- app/javascript/mastodon/components/status.js | 2 +- app/models/account_conversation.rb | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/javascript/mastodon/components/display_name.js b/app/javascript/mastodon/components/display_name.js index 32809778a..6b9dd6f81 100644 --- a/app/javascript/mastodon/components/display_name.js +++ b/app/javascript/mastodon/components/display_name.js @@ -22,7 +22,7 @@ export default class DisplayName extends React.PureComponent { suffix = `+${others.size - 2}`; } } else { - if (others) { + if (others && others.size > 0) { account = others.first(); } else { account = this.props.account; diff --git a/app/javascript/mastodon/components/status.js b/app/javascript/mastodon/components/status.js index 3e98d374b..6270d3c92 100644 --- a/app/javascript/mastodon/components/status.js +++ b/app/javascript/mastodon/components/status.js @@ -326,7 +326,7 @@ class Status extends ImmutablePureComponent { ); } - if (otherAccounts) { + if (otherAccounts && otherAccounts.size > 0) { statusAvatar = ; } else if (account === undefined || account === null) { statusAvatar = ; diff --git a/app/models/account_conversation.rb b/app/models/account_conversation.rb index cc6b39279..0c03747e2 100644 --- a/app/models/account_conversation.rb +++ b/app/models/account_conversation.rb @@ -30,7 +30,8 @@ class AccountConversation < ApplicationRecord if participant_account_ids.empty? [account] else - Account.where(id: participant_account_ids) + participants = Account.where(id: participant_account_ids) + participants.empty? ? [account] : participants end end