Commit Graph

9217 Commits

Author SHA1 Message Date
Claire c61b29ebfd Refactor some more 2022-01-16 22:26:18 +01:00
Claire 30d9abdfc9 Refactor glitch-soc's theme handling 2022-01-16 22:12:11 +01:00
Claire 081e4426f8
Fix admin interface crash when displaying deleted user (#17301) 2022-01-16 20:57:37 +01:00
Jeong Arm 474cd302c9 [Glitch] Gradually increase retry waiting for media processing
Port bc7a8ae6d6 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2022-01-16 18:14:33 +01:00
Claire b61c3ddff8 Merge branch 'main' into glitch-soc/merge-upstream
Conflicts:
- `README.md`:
  Upstream added some text, but our README is completely different.
  Kept our README unchanged.
2022-01-16 18:11:20 +01:00
Eugen Rochko 8e84ebf0cb
Remove IP tracking columns from users table (#16409) 2022-01-16 13:23:50 +01:00
Jeong Arm bc7a8ae6d6
Gradually increase retry waiting for media processing (#17271) 2022-01-10 14:25:08 +01:00
Claire af86c7a5de [Glitch] Fix media descriptions not being used for client-side filtering
Port 37e80994f8 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2022-01-07 19:54:58 +01:00
Claire fca50e4b50 Merge branch 'main' into glitch-soc/merge-upstream 2022-01-07 19:51:47 +01:00
Jeong Arm d3db2eb7fb
Remove custom emojis on domain purge (#17210) 2021-12-30 08:41:09 +01:00
Claire 37e80994f8
Fix media descriptions not being used for client-side filtering (#17206)
Fix oversight in #13837
2021-12-28 23:25:50 +01:00
Rens Groothuijsen f011787003 [Glitch] Fix tag rendering error in hashtag column settings
Port e65080181a to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2021-12-27 15:22:12 +01:00
Claire 09c61e1376 Merge branch 'main' into glitch-soc/merge-upstream
Conflicts:
- `README.md`:
  We have completely different contents. Kept our version.
- `package.json`:
  Not a real conflict, just an upstream dependency udpated
  textually too close to a glitch-soc-only dependency.
  Updated dependencies like upstream.
- `streaming/index.js`:
  Conflict due to code style changes on parts that were
  modified in glitch-soc to handle local-only toots.
  Changed style according to upstream.
2021-12-27 15:16:18 +01:00
Eugen Rochko fe71548844
Fix warnings on Rails boot (#16946) 2021-12-27 00:47:20 +01:00
Rens Groothuijsen e65080181a
Fix tag rendering error in hashtag column settings (#17184)
* Flatten tags in configuration to regular array before converting to JSON

* Render filter tags using toJS instead of toJSON
2021-12-26 19:22:05 +01:00
Jeong Arm 720e8ab0f5
Fix duplicate record on admin/accounts when searching with IP (#17150) 2021-12-21 00:17:14 +01:00
Claire e061ea5f71 [Glitch] Change title of retention chart
Port 0c17fd9109 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2021-12-18 11:47:54 +01:00
Claire d4f315f304 Merge branch 'main' into glitch-soc/merge-upstream 2021-12-18 11:44:54 +01:00
Claire 76761d5fc0
Add ability for admins to delete canonical email blocks (#16644)
* Add admin option to remove canonical email blocks from a deleted account

* Add tootctl canonical_email_blocks to inspect and remove canonical email blocks
2021-12-17 23:02:14 +01:00
Claire 7f803c41e2
Add ability to purge undeliverable domains from admin interface (#16686)
* Add ability to purge undeliverable domains from admin interface

* Add tests
2021-12-17 23:01:21 +01:00
Claire 0c17fd9109
Change title of retention chart (#16909)
Changes from “Retention” to “User retention rate by month after sign-up”.
This should make it much clearer to people not familiar with retention charts
what it actually means.
2021-12-17 23:00:41 +01:00
Claire 40f202c1e5
Change list title input styling (#17092) 2021-12-17 23:00:05 +01:00
David Sterry 50d62fe2e7 [Glitch] ignore hashtag suggestions if they vary only in case
Port 2aafa5b4e7 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2021-12-16 16:48:42 +01:00
Rens Groothuijsen 59a5193280 [Glitch] Show correct error message if chosen password is too long
Port 66baa629ea to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2021-12-16 16:26:04 +01:00
Eugen Rochko 9cecf59300 [Glitch] Add batch suspend for accounts in admin UI
Port SCSS changes from 2aafa5b4e7 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2021-12-16 16:25:21 +01:00
Claire b2526316f5 Merge branch 'main' into glitch-soc/merge-upstream
Conflicts:
- `app/views/admin/pending_accounts/index.html.haml`:
  Removed upstream, while it had glitch-soc-specific changes to accomodate
  for glitch-soc's theming system.
  Removed the file.

Additional changes:
- `app/views/admin/accounts/index.html.haml':
  Accomodate for glitch-soc's theming system.
2021-12-16 16:20:44 +01:00
David Sterry 2aafa5b4e7
ignore hashtag suggestions if they vary only in case (#16460)
* ignore hashtag suggestions if they vary only in case

* remove console.logs and unused args

* consistently add space when dismissing suggestions

* linting
2021-12-15 23:47:19 +01:00
Takeshi Umeda bda8e4f815
Fix follow recommendation biased towards older accounts (#17126) 2021-12-13 23:21:14 +01:00
Eugen Rochko fe45184b36
Change trending hashtags threshold back from 15 to 5 (#17122) 2021-12-13 05:32:29 +01:00
heguro 41503507ec
Fix redirection when succeeded WebAuthn (#17098) 2021-12-05 21:50:12 +01:00
Rens Groothuijsen 66baa629ea
Show correct error message if chosen password is too long (#17082)
* Add correct error message for exceeding max length on password confirmation field

* Code style fixes
2021-12-05 21:49:50 +01:00
Eugen Rochko 0fb9536d38
Add batch suspend for accounts in admin UI (#17009) 2021-12-05 21:48:39 +01:00
Claire d911c17f52 Fix unneeded outline around list name edition input 2021-12-03 21:03:40 +01:00
Claire 5bf3a09c5b Merge branch 'main' into glitch-soc/merge-upstream 2021-11-30 12:13:54 +01:00
Eugen Rochko a458b74c7e
Fix error on trending mailer due to missing constant (#17072) 2021-11-29 17:39:40 +01:00
Jeong Arm 4a109ec1ba
Fix server graph on admin/tags/:id (#17066) 2021-11-28 23:13:07 +01:00
Claire ca5d78816b [Glitch] Fix searching for additional hashtags in hashtag column
Port 3f382e337d to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2021-11-26 22:58:46 +01:00
Claire d5d44b431a [Glitch] Fix color of hashtag column settings inputs
Port 1630807ee2 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2021-11-26 22:58:13 +01:00
Claire 9b861d56a9 Merge branch 'main' into glitch-soc/merge-upstream
Conflicts:
- `.env.production.sample`:
  Copied upstream changes.
- `app/controllers/settings/identity_proofs_controller.rb`:
  Minor conflict due to glitch-soc's extra “enable_keybase” setting.
  Upstream removed keybase support altogether, so did the same.
- `app/controllers/well_known/keybase_proof_config_controller.rb`:
  Minor conflict due to glitch-soc's extra “enable_keybase” setting.
  Upstream removed keybase support altogether, so did the same.
- `lib/mastodon/statuses_cli.rb`:
  Minor conflict due to an optimization that wasn't shared between
  the two versions. Copied upstream's version.
2021-11-26 22:53:55 +01:00
Jeong Arm 1c826471e7
Fix admin statuses order(#16937) (#16969)
* Fix #16937

* Add test for statuses order
2021-11-26 22:12:27 +01:00
Claire 3f382e337d
Fix searching for additional hashtags in hashtag column (#17054) 2021-11-26 22:11:09 +01:00
Claire 1630807ee2
Fix color of hashtag column settings inputs (#17058)
Fixes #17057
2021-11-26 22:09:11 +01:00
Claire ddcb9da74f
Fix opening wrong profile when clicking on username of boosting user in WebUI (#17060)
Fixes #16799
2021-11-26 22:04:09 +01:00
Jeong Arm 97151840b0 [Glitch] Port upstream changes about trending links 2021-11-26 11:36:22 +01:00
Eugen Rochko 7de0ee7aba
Remove Keybase integration (#17045) 2021-11-26 05:58:18 +01:00
Claire 3304df0ab5 Merge branch 'main' into glitch-soc/merge-upstream 2021-11-26 01:15:32 +01:00
Claire afd71867ba Revert "Fix trends admin page crashing"
This reverts commit 5f10e64330.
2021-11-26 01:15:29 +01:00
Eugen Rochko 12b3ff6c6d
Fix error on trending hashtags/links pages in admin UI due to missing constant (#17044) 2021-11-26 01:12:39 +01:00
Claire 5f10e64330 Fix trends admin page crashing 2021-11-26 00:50:13 +01:00
Claire 0ccaedc92b Disable trending links review request emails 2021-11-25 23:55:05 +01:00
Claire 67c4e8e317 [Glitch] Fix handling of recursive toots in WebUI
Port b1fd6d4490 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2021-11-25 23:52:22 +01:00
Claire 443ec4f8ba Merge branch 'main' into glitch-soc/merge-upstream
Conflicts:
- `app/views/admin/tags/index.html.haml`:
  Removed upstream while it had changes in glitch-soc to accomodate for the
  theming system.

Additional changes to accomodate for the theming system:
- `app/views/admin/trends/links/preview_card_providers/index.html.haml`
- `app/views/admin/trends/links/index.html.haml`
- `app/views/admin/trends/tags/index.html.haml`
- `app/views/admin/tags/show.html.haml`
2021-11-25 23:50:35 +01:00
Claire b1fd6d4490
Fix handling of recursive toots in WebUI (#17041) 2021-11-25 23:46:39 +01:00
Claire 013bee6afb
Fix filtering DMs from non-followed users (#17042) 2021-11-25 23:46:30 +01:00
Claire 534b0a2704 Merge branch 'main' into glitch-soc/merge-upstream 2021-11-25 18:42:18 +01:00
Eugen Rochko 6e50134a42
Add trending links (#16917)
* Add trending links

* Add overriding specific links trendability

* Add link type to preview cards and only trend articles

Change trends review notifications from being sent every 5 minutes to being sent every 2 hours

Change threshold from 5 unique accounts to 15 unique accounts

* Fix tests
2021-11-25 13:07:38 +01:00
Claire 02a87431cf
Fix error when suspending user with an already-existing canonical email block (#17036)
* Fix error when suspending user with an already-existing canonical email block

Fixes #17033

While attempting to create a `CanonicalEmailBlock` with an existing hash would
raise an `ActiveRecord::RecordNotUnique` error, this being done within a
transaction would cancel the whole transaction. For this reason, checking for
uniqueness in Rails would query the database within the transaction and avoid
invalidating the whole transaction for this reason.

A race condition is still possible, where multiple accounts sharing a canonical
email would be blocked in concurrent transactions, in which only one would
succeed, but that is way less likely to happen that the current issue, and can
always be retried after the first failure, unlike the current situation.

* Add tests
2021-11-24 17:41:03 +01:00
Claire 189cf652e6 [Glitch] Fix overflow of long profile fields in admin view
Port db32835338 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2021-11-19 18:55:27 +01:00
Claire 2b4c7beb73 Merge branch 'main' into glitch-soc/merge-upstream 2021-11-19 18:51:41 +01:00
Claire db32835338
Fix overflow of long profile fields in admin view (#17010) 2021-11-19 18:22:49 +01:00
Claire 6159020617
Fix background-color of emoji-mart selector (#17011)
Reverts part of #16907 to fix hardcoded color
2021-11-19 18:21:37 +01:00
Takeshi Umeda 3419d3ec84
Bump chewy from 5.2.0 to 7.2.3 (supports Elasticsearch 7.x) (#16915)
* Bump chewy from 5.2.0 to 7.2.2

* fix style (codeclimate)

* fix style

* fix style

* Bump chewy from 7.2.2 to 7.2.3
2021-11-18 22:02:08 +01:00
Mashiro 2b6a25c609
Add lazy load to emoji-mart (#16907)
* perf: lazyload emoji-mart!

* Bump lazyload
2021-11-18 22:01:31 +01:00
Claire 3517867b76
Fix confusing error when webfinger request returns empty document (#16986)
For some reason, some misconfigured servers return an empty document when
queried over webfinger. Since an empty document does not lead to a parse
error, the error is not caught properly and triggers uncaught exceptions
later on.

This PR fixes that by immediately erroring out with `Webfinger::Error` on
getting an empty response.
2021-11-14 21:55:40 +01:00
Eugen Rochko 5d7c852283
Fix no link previews being generated for pages with invalid structured data (#16979)
Fix #16955
2021-11-13 23:07:13 +01:00
Claire 2cda8be805 Merge branch 'main' into glitch-soc/merge-upstream 2021-11-13 09:40:13 +01:00
Claire ef8deb0878
Fix OpenGraph/LinkedData embeds having incorrectly-generated iframes (#16978) 2021-11-13 03:30:27 +01:00
Jeong Arm 8b8d58c670 Rename, move, fix code 2021-11-12 19:51:35 +01:00
Jeong Arm 3238e60823 Fix admin sidebar on Mobile layout 2021-11-12 19:51:35 +01:00
Claire f33878969a Fix some glitch-soc styling issues due to different class names
Partial fix to #1629
2021-11-12 16:29:36 +01:00
Claire 4bb6b1a1e7 Merge branch 'main' into glitch-soc/merge-upstream 2021-11-06 00:15:38 +01:00
Claire 6da135a493
Fix reviving revoked sessions and invalidating login (#16943)
Up until now, we have used Devise's Rememberable mechanism to re-log users
after the end of their browser sessions. This mechanism relies on a signed
cookie containing a token. That token was stored on the user's record,
meaning it was shared across all logged in browsers, meaning truly revoking
a browser's ability to auto-log-in involves revoking the token itself, and
revoking access from *all* logged-in browsers.

We had a session mechanism that dynamically checks whether a user's session
has been disabled, and would log out the user if so. However, this would only
clear a session being actively used, and a new one could be respawned with
the `remember_user_token` cookie.

In practice, this caused two issues:
- sessions could be revived after being closed from /auth/edit (security issue)
- auto-log-in would be disabled for *all* browsers after logging out from one
  of them

This PR removes the `remember_token` mechanism and treats the `_session_id`
cookie/token as a browser-specific `remember_token`, fixing both issues.
2021-11-06 00:13:58 +01:00
Claire 87085a5152
Fix AccountNote not having a maximum length (#16942) 2021-11-06 00:12:25 +01:00
Eugen Rochko 39cdf61ab7
Add support for structured data and more OpenGraph tags to link cards (#16938)
Save preview cards under their canonical URL

Increase max redirects to follow from 2 to 3
2021-11-05 23:23:05 +01:00
Claire 989c67d29d
Fix handling announcements with links (#16941)
Broken since #15827
2021-11-05 21:14:35 +01:00
Jeong Arm 458830ee7c
Fix statuses order in account's statuses admin page (#16937) 2021-11-04 15:49:35 +01:00
mayaeh 7ccbfb55dd
ran `yarn manage:translations en` (#16912) 2021-10-28 05:29:49 +02:00
Sasha Sorokin a30ac454b2 [Glitch] Split context for filter bar and unread markers
Port 11d4f9eefc to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2021-10-25 20:37:07 +02:00
Mashiro dbbb077c19 [Glitch] Enhance dashboard styles
Port b58d32cfe2 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2021-10-25 20:36:31 +02:00
Claire e855df149b Merge branch 'main' into glitch-soc/merge-upstream
Conflicts:
- `.env.production.sample`:
  Upstream added new configuration options, uncommented by default.
  Commented them.
- `Gemfile.lock`:
  Upstream updated dependencies textually close to glitch-soc-specific
  dependencies.
  Updated those upstream dependencies.
2021-10-25 20:28:51 +02:00
Sasha Sorokin 11d4f9eefc
Split context for filter bar and unread markers (#16865)
On notifications page, in settings, "Show" for quick filter bar and
unread notifications markers use the same string, while being placed in
the separate contexts - under different settings categories.

This commit splits the contexts, creating new strings:

- "Show filter bar" in place of "Show" for filter bar;

- "Highlight unread notifications" in place of "Show" for unread
  notification markers, which are now simply called "Highlighting";

- There's also "Unread notifications" in place of "Unread notification
  markers" string to accompany the changes to "Show" string under that
  category.

All new strings have new IDs, which will cause previous strings to
invalidate on the next translation update and new strings to be created.
This will help Mastodon translators to know that there are changes and
improve translation in accordance to the source string update.
2021-10-25 16:32:28 +02:00
atsu1125 dae377b3b5 translation glitch's web interface [ja]
Squashed commit of the following:

commit f8c339b4dafd7347c5e824191dbf28d770d6583d
Author: atsuchan <83960488+atsu1125@users.noreply.github.com>
Date:   Sat Oct 23 20:24:28 2021 +0900

    translation glitch's web interface [ja]

commit a9520d5c5fb21490fa66c51bf1063f1edb9150ff
Author: atsu1125 <mastodon@atsuchan.page>
Date:   Sat Oct 23 15:21:55 2021 +0900

    translation glitch's web interface [ja]

commit 699848f2abff24be149c4a1c623df8b920ef2ed9
Author: atsu1125 <mastodon@atsuchan.page>
Date:   Sat Oct 23 13:23:39 2021 +0900

    translation glitch's web interface [ja]
2021-10-24 00:05:33 +09:00
Claire ec059317fa
Fix some link previews being incorrectly generated from other prior links (#16885)
* Add tests

* Fix some link previews being incorrectly generated from different prior links

PR #12403 added a cache to avoid redundant queries when the OEmbed endpoint can
be guessed from the URL. This caching mechanism is not perfectly correct as
there is no guarantee that all pages from a given domain share the same
OEmbed provider endpoint.

This PR prevents the FetchOEmbedService from caching OEmbed endpoint that
cannot be generalized by replacing a fully-qualified URL from the endpoint's
parameters, greatly reducing the number of incorrect cached generalizations.
2021-10-21 20:39:35 +02:00
Mashiro b58d32cfe2
Enhance dashboard styles (#16884)
* Display sparkline graph on Chrome

* Heatmap auto overflow

* Change grid columns number on small screen

* Please codeclimate bot

* Remove graph height
2021-10-21 06:24:34 +02:00
Claire 3f9b28ce26
Add support for fetching Create and Announce activities by URI (#16383)
* Add support for fetching Create and Announce activities by URI

This should improve compatibility with ZAP and offer a way to fetch boosts,
which is currently not possible.

* Add tests
2021-10-21 01:14:04 +02:00
atsu1125 aa6269b08e translation glitch's client setting interface [ja] 2021-10-20 13:00:51 +09:00
Takeshi Umeda 17f4e457b3
Add remove from followers api (#16864)
* Add followed_by? to account_interactions

* Add RemoveFromFollowersService

* Fix AccountBatch to use RemoveFromFollowersService

* Add remove from followers API
2021-10-18 12:02:35 +02:00
Eugen Rochko f00043dc4b
New Crowdin updates (#16354)
* New translations en.json (Latvian)
[ci skip]

* New translations en.json (Hebrew)
[ci skip]

* New translations en.json (Hebrew)
[ci skip]

* New translations simple_form.en.yml (Breton)
[ci skip]

* New translations simple_form.en.yml (Breton)
[ci skip]

* New translations simple_form.en.yml (Breton)
[ci skip]

* New translations simple_form.en.yml (Breton)
[ci skip]

* New translations en.json (Icelandic)
[ci skip]

* New translations en.json (Icelandic)
[ci skip]

* New translations en.json (Chinese Simplified)
[ci skip]

* New translations en.yml (Chinese Simplified)
[ci skip]

* New translations en.yml (Chinese Simplified)
[ci skip]

* New translations simple_form.en.yml (Chinese Simplified)
[ci skip]

* New translations devise.en.yml (Chinese Simplified)
[ci skip]

* New translations en.yml (Chinese Simplified)
[ci skip]

* New translations devise.en.yml (Chinese Simplified)
[ci skip]

* New translations en.json (Persian)
[ci skip]

* New translations en.json (Finnish)
[ci skip]

* New translations doorkeeper.en.yml (Finnish)
[ci skip]

* New translations doorkeeper.en.yml (Finnish)
[ci skip]

* New translations doorkeeper.en.yml (Finnish)
[ci skip]

* New translations doorkeeper.en.yml (Finnish)
[ci skip]

* New translations doorkeeper.en.yml (Finnish)
[ci skip]

* New translations en.yml (Finnish)
[ci skip]

* New translations en.yml (Finnish)
[ci skip]

* New translations en.yml (Finnish)
[ci skip]

* New translations en.yml (Finnish)
[ci skip]

* New translations en.yml (Finnish)
[ci skip]

* New translations en.yml (Finnish)
[ci skip]

* New translations en.yml (Finnish)
[ci skip]

* New translations en.yml (Finnish)
[ci skip]

* New translations en.yml (Finnish)
[ci skip]

* New translations en.yml (Finnish)
[ci skip]

* New translations en.yml (Finnish)
[ci skip]

* New translations en.yml (Finnish)
[ci skip]

* New translations en.yml (Finnish)
[ci skip]

* New translations en.yml (Finnish)
[ci skip]

* New translations en.yml (Finnish)
[ci skip]

* New translations en.yml (Finnish)
[ci skip]

* New translations en.yml (Finnish)
[ci skip]

* New translations en.yml (Finnish)
[ci skip]

* New translations en.yml (Finnish)
[ci skip]

* New translations en.yml (Finnish)
[ci skip]

* New translations en.yml (Finnish)
[ci skip]

* New translations en.yml (Finnish)
[ci skip]

* New translations en.yml (Finnish)
[ci skip]

* New translations en.yml (Finnish)
[ci skip]

* New translations en.yml (Finnish)
[ci skip]

* New translations en.yml (Finnish)
[ci skip]

* New translations en.yml (French)
[ci skip]

* New translations en.yml (French)
[ci skip]

* New translations en.json (Russian)
[ci skip]

* New translations en.json (Russian)
[ci skip]

* New translations en.json (Russian)
[ci skip]

* New translations activerecord.en.yml (Latvian)
[ci skip]

* New translations devise.en.yml (Latvian)
[ci skip]

* New translations devise.en.yml (Latvian)
[ci skip]

* New translations devise.en.yml (Latvian)
[ci skip]

* New translations devise.en.yml (Latvian)
[ci skip]

* New translations devise.en.yml (Latvian)
[ci skip]

* New translations devise.en.yml (Latvian)
[ci skip]

* New translations doorkeeper.en.yml (Latvian)
[ci skip]

* New translations en.yml (Slovak)
[ci skip]

* New translations doorkeeper.en.yml (Latvian)
[ci skip]

* New translations en.yml (Slovak)
[ci skip]

* New translations doorkeeper.en.yml (Latvian)
[ci skip]

* New translations doorkeeper.en.yml (Latvian)
[ci skip]

* New translations en.yml (Latvian)
[ci skip]

* New translations en.yml (Latvian)
[ci skip]

* New translations en.yml (Latvian)
[ci skip]

* New translations en.yml (Latvian)
[ci skip]

* New translations en.yml (Latvian)
[ci skip]

* New translations en.yml (Finnish)
[ci skip]

* New translations en.yml (Finnish)
[ci skip]

* New translations en.yml (Finnish)
[ci skip]

* New translations en.yml (Finnish)
[ci skip]

* New translations en.yml (Esperanto)
[ci skip]

* New translations en.yml (Esperanto)
[ci skip]

* New translations devise.en.yml (Latvian)
[ci skip]

* New translations devise.en.yml (Latvian)
[ci skip]

* New translations devise.en.yml (Latvian)
[ci skip]

* New translations devise.en.yml (Latvian)
[ci skip]

* New translations devise.en.yml (Latvian)
[ci skip]

* New translations doorkeeper.en.yml (Latvian)
[ci skip]

* New translations doorkeeper.en.yml (Latvian)
[ci skip]

* New translations doorkeeper.en.yml (Latvian)
[ci skip]

* New translations doorkeeper.en.yml (Latvian)
[ci skip]

* New translations devise.en.yml (Latvian)
[ci skip]

* New translations simple_form.en.yml (Latvian)
[ci skip]

* New translations simple_form.en.yml (Latvian)
[ci skip]

* New translations simple_form.en.yml (Latvian)
[ci skip]

* New translations simple_form.en.yml (Latvian)
[ci skip]

* New translations simple_form.en.yml (Latvian)
[ci skip]

* New translations simple_form.en.yml (Latvian)
[ci skip]

* New translations simple_form.en.yml (Latvian)
[ci skip]

* New translations simple_form.en.yml (Latvian)
[ci skip]

* New translations en.yml (Slovak)
[ci skip]

* New translations simple_form.en.yml (Latvian)
[ci skip]

* New translations simple_form.en.yml (Slovak)
[ci skip]

* New translations simple_form.en.yml (Latvian)
[ci skip]

* New translations simple_form.en.yml (Latvian)
[ci skip]

* New translations simple_form.en.yml (Latvian)
[ci skip]

* New translations simple_form.en.yml (Latvian)
[ci skip]

* New translations simple_form.en.yml (Latvian)
[ci skip]

* New translations simple_form.en.yml (Latvian)
[ci skip]

* New translations simple_form.en.yml (Latvian)
[ci skip]

* New translations simple_form.en.yml (Latvian)
[ci skip]

* New translations simple_form.en.yml (Latvian)
[ci skip]

* New translations simple_form.en.yml (Latvian)
[ci skip]

* New translations simple_form.en.yml (Latvian)
[ci skip]

* New translations simple_form.en.yml (Latvian)
[ci skip]

* New translations simple_form.en.yml (Latvian)
[ci skip]

* New translations en.yml (Latvian)
[ci skip]

* New translations en.yml (Latvian)
[ci skip]

* New translations en.yml (Latvian)
[ci skip]

* New translations en.yml (Latvian)
[ci skip]

* New translations en.yml (Latvian)
[ci skip]

* New translations en.yml (Latvian)
[ci skip]

* New translations en.yml (Latvian)
[ci skip]

* New translations en.yml (Latvian)
[ci skip]

* New translations en.yml (Latvian)
[ci skip]

* New translations en.yml (Latvian)
[ci skip]

* New translations en.yml (Latvian)
[ci skip]

* New translations en.yml (Latvian)
[ci skip]

* New translations en.yml (Latvian)
[ci skip]

* New translations en.yml (Armenian)
[ci skip]

* New translations en.json (Danish)
[ci skip]

* New translations en.yml (Arabic)
[ci skip]

* New translations en.yml (Catalan)
[ci skip]

* New translations en.yml (Czech)
[ci skip]

* New translations en.yml (Danish)
[ci skip]

* New translations en.yml (Spanish)
[ci skip]

* New translations en.yml (German)
[ci skip]

* New translations en.yml (Greek)
[ci skip]

* New translations en.yml (Basque)
[ci skip]

* New translations en.yml (Hungarian)
[ci skip]

* New translations en.yml (Slovak)
[ci skip]

* New translations en.yml (Persian)
[ci skip]

* New translations en.yml (Swedish)
[ci skip]

* New translations en.yml (French)
[ci skip]

* New translations en.yml (Chinese Simplified)
[ci skip]

* New translations en.yml (Finnish)
[ci skip]

* New translations en.yml (Latvian)
[ci skip]

* New translations en.yml (Italian)
[ci skip]

* New translations en.yml (Sinhala)
[ci skip]

* New translations en.yml (Sardinian)
[ci skip]

* New translations en.yml (Esperanto)
[ci skip]

* New translations en.yml (Vietnamese)
[ci skip]

* New translations en.yml (Turkish)
[ci skip]

* New translations en.yml (Ukrainian)
[ci skip]

* New translations en.yml (Chinese Traditional)
[ci skip]

* New translations en.yml (Galician)
[ci skip]

* New translations en.yml (Icelandic)
[ci skip]

* New translations en.yml (Portuguese, Brazilian)
[ci skip]

* New translations en.yml (Indonesian)
[ci skip]

* New translations en.yml (Tamil)
[ci skip]

* New translations en.yml (Spanish, Argentina)
[ci skip]

* New translations en.yml (Serbian (Cyrillic))
[ci skip]

* New translations en.yml (Albanian)
[ci skip]

* New translations en.yml (Japanese)
[ci skip]

* New translations en.yml (Georgian)
[ci skip]

* New translations en.yml (Korean)
[ci skip]

* New translations en.yml (Lithuanian)
[ci skip]

* New translations en.yml (Dutch)
[ci skip]

* New translations en.yml (Norwegian)
[ci skip]

* New translations en.yml (Polish)
[ci skip]

* New translations en.yml (Portuguese)
[ci skip]

* New translations en.yml (Russian)
[ci skip]

* New translations en.yml (Slovenian)
[ci skip]

* New translations en.yml (Spanish, Mexico)
[ci skip]

* New translations en.yml (Norwegian Nynorsk)
[ci skip]

* New translations en.yml (Estonian)
[ci skip]

* New translations en.yml (Kazakh)
[ci skip]

* New translations en.json (Norwegian Nynorsk)
[ci skip]

* New translations en.yml (Thai)
[ci skip]

* New translations en.yml (Bengali)
[ci skip]

* New translations en.yml (Asturian)
[ci skip]

* New translations en.yml (Scottish Gaelic)
[ci skip]

* New translations en.yml (Occitan)
[ci skip]

* New translations en.json (Kurmanji (Kurdish))
[ci skip]

* New translations en.yml (Kurmanji (Kurdish))
[ci skip]

* New translations en.json (Sorani (Kurdish))
[ci skip]

* New translations en.yml (Breton)
[ci skip]

* New translations en.yml (Malay)
[ci skip]

* New translations en.yml (Welsh)
[ci skip]

* New translations en.yml (Chinese Traditional, Hong Kong)
[ci skip]

* New translations en.yml (Tatar)
[ci skip]

* New translations en.yml (Malayalam)
[ci skip]

* New translations en.yml (Sorani (Kurdish))
[ci skip]

* New translations en.yml (Corsican)
[ci skip]

* New translations en.yml (Kabyle)
[ci skip]

* New translations en.yml (Catalan)
[ci skip]

* New translations en.yml (Polish)
[ci skip]

* New translations en.yml (Russian)
[ci skip]

* New translations en.yml (Russian)
[ci skip]

* New translations en.yml (Catalan)
[ci skip]

* New translations en.yml (Kurmanji (Kurdish))
[ci skip]

* New translations en.json (Russian)
[ci skip]

* New translations en.yml (Czech)
[ci skip]

* New translations en.json (Russian)
[ci skip]

* New translations en.yml (Czech)
[ci skip]

* New translations en.yml (Czech)
[ci skip]

* New translations en.yml (Turkish)
[ci skip]

* New translations en.yml (Occitan)
[ci skip]

* New translations en.yml (Czech)
[ci skip]

* New translations en.yml (Kurmanji (Kurdish))
[ci skip]

* New translations en.yml (Czech)
[ci skip]

* New translations en.yml (Danish)
[ci skip]

* New translations en.yml (Danish)
[ci skip]

* New translations en.yml (Kurmanji (Kurdish))
[ci skip]

* New translations en.yml (Norwegian)
[ci skip]

* New translations en.yml (Kurmanji (Kurdish))
[ci skip]

* New translations en.yml (Chinese Traditional)
[ci skip]

* New translations en.yml (Galician)
[ci skip]

* New translations en.yml (Galician)
[ci skip]

* New translations en.yml (French)
[ci skip]

* New translations en.yml (French)
[ci skip]

* New translations en.yml (Chinese Traditional)
[ci skip]

* New translations en.yml (Hungarian)
[ci skip]

* New translations en.yml (Albanian)
[ci skip]

* New translations en.yml (Albanian)
[ci skip]

* New translations en.yml (Ukrainian)
[ci skip]

* New translations en.yml (Latvian)
[ci skip]

* New translations en.yml (Latvian)
[ci skip]

* New translations en.yml (Latvian)
[ci skip]

* New translations en.yml (Portuguese)
[ci skip]

* New translations en.yml (Latvian)
[ci skip]

* New translations en.json (Portuguese)
[ci skip]

* New translations en.yml (Portuguese)
[ci skip]

* New translations en.yml (Latvian)
[ci skip]

* New translations en.yml (Latvian)
[ci skip]

* New translations en.yml (Latvian)
[ci skip]

* New translations en.yml (Latvian)
[ci skip]

* New translations en.yml (Latvian)
[ci skip]

* New translations en.yml (Latvian)
[ci skip]

* New translations en.yml (Latvian)
[ci skip]

* New translations en.yml (Latvian)
[ci skip]

* New translations en.yml (Latvian)
[ci skip]

* New translations en.yml (Latvian)
[ci skip]

* New translations en.yml (Latvian)
[ci skip]

* New translations en.yml (Spanish)
[ci skip]

* New translations en.yml (Hungarian)
[ci skip]

* New translations en.yml (Italian)
[ci skip]

* New translations en.yml (Indonesian)
[ci skip]

* New translations en.yml (Indonesian)
[ci skip]

* New translations devise.en.yml (French)
[ci skip]

* Run `i18n-tasks normalize`

* Run `yarn manage:translations`

* Trim unnecessary line breaks

Co-authored-by: Yamagishi Kazutoshi <ykzts@desire.sh>
2021-10-17 10:28:51 +09:00
Claire 6964952d5f Merge branch 'main' into glitch-soc/merge-upstream 2021-10-14 22:22:39 +02:00
Claire a184c860ca
Fix retention rate computation (#16854) 2021-10-14 22:20:37 +02:00
Claire b2eaf5562d Merge branch 'main' into glitch-soc/merge-upstream
Conflicts:
- `README.md`:
  Upstream added some documentation in the README, but our README is pretty
  different and barebone.
  Kept our README.
2021-10-14 22:14:26 +02:00
Eugen Rochko 7aec1bc308 [Glitch] Add graphs and retention metrics to admin dashboard (#16829)
Port 07341e7aa6 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2021-10-14 21:45:01 +02:00
Claire 694c073d1f Merge branch 'main' into glitch-soc/merge-upstream
Conflicts:
- `app/controllers/admin/dashboard_controller.rb`:
  Upstream completely redesigned the admin dashboard.
  glitch-soc tracked extra features, but that list is
  gone.
  Followed upstram.
- `app/views/admin/dashboard/index.html.haml`
  Upstream completely redesigned the admin dashboard.
  glitch-soc tracked extra features, but that list is
  gone.
  Followed upstram.
2021-10-14 21:44:57 +02:00
Jeong Arm f4081d1564
Allow keeping only 1 boosts/favs on auto deleting posts (#16653)
* Allow keeping 1 boosts/favs on auto deleting posts

* Fix tests
2021-10-14 21:11:14 +02:00
Claire b21f3aa21d
Minor memory optimizations (#16507)
Reduce constant memory usage by ~100kB and further reduce boot-up memory
allocations and temporary memory use by a further ~200kB.
2021-10-14 21:04:57 +02:00
Jeong Arm 3ec8e04b3b
Add font-display to display text before loading (#16330) 2021-10-14 21:04:26 +02:00
gunchleoc 8ce42640e5
Add Northern Kurdish locale as requested by translator. It already has a project started on Crowdin. (#16548) 2021-10-14 21:02:54 +02:00
Claire 9b978872cc
Fix 404 error when filtering admin action logs by non-existent target account (#16643)
Currently, there is no way for an admin to delete an account record. However,
should that happen in the future, or should an admin mistype an account id,
`/admin/action_logs?target_account_id=<non-existent-account-id>` currently
returns a 404 instead of an empty list.

With this commit, the aforementioned page returns a correct list instead
(potentially non-empty if the account has been manually deleted)
2021-10-14 20:53:11 +02:00
Eugen Rochko 07341e7aa6
Add graphs and retention metrics to admin dashboard (#16829) 2021-10-14 20:44:59 +02:00
Claire 216570ad98
Fix scheduled statuses decreasing statuses counts (#16791)
* Add tests

* Fix scheduled statuses decreasing statuses counts

Fixes #16774
2021-10-14 19:59:21 +02:00
Sasha Sorokin 5169b374c6 [Glitch] Add single option votes tooltip in polls
Port 89b5071fde to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2021-10-13 15:53:33 +02:00
Claire 1665b84285 Merge branch 'main' into glitch-soc/merge-upstream
Conflicts:
- `package.json`:
  Not really a conflict, just a glitch-soc-only dependency textually too close
  to an updated upstream one.
- `yarn.lock`:
  Not really a conflict, just a glitch-soc-only dependency textually too close
  to an updated upstream one.
2021-10-13 15:50:24 +02:00
Claire 5159ba26e4
Fix error when rendering public pages with media attachments (#16763)
* Add tests

* Fix error when rendering public pages with media attachments

* Add tests

* Fix tests

* Please CodeClimate
2021-10-13 15:27:19 +02:00
Sasha Sorokin 89b5071fde
Add single option votes tooltip in polls (#16849)
Adds a tooltip when hovering over the percentages in a poll showing how
many votes were cast for that option.

Also removes descriptions from messages here since they are not picked
up by Crowdin anyway and might be confusing to other developers :)

Fixes #16820
2021-10-13 04:59:31 +02:00
Jeong Arm 0220065770 Fix status open hotkey 2021-10-07 23:40:35 +02:00
Julianne420 ebb4de7d3e Add zh-CN translations 2021-10-07 23:40:18 +02:00
Mélanie Chauvel cef109e046 [Glitch] Improve hover and focus style in columns settings
Port 900481b7fa to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2021-10-06 16:51:42 +02:00
Claire 079ed6c26d Merge branch 'main' into glitch-soc/merge-upstream 2021-10-06 16:46:32 +02:00
Claire 84ceebe1c4
Fix media attachment size validation not correctly accounting for file type (#16819)
* Fix media attachment size validation not correctly accounting for file type

Fixes a regression introduced in #16724 caused by the fact that kt-paperclip
now correctly runs validations before processing, meaning that file size
verification could not rely on our before_post_processing hook.

Moved the `before_post_processing` hooks to `before_validate` to make sure
the media attachment type is set correctly before the file gets validated.

* Add tests
2021-10-06 14:49:32 +01:00
Mélanie Chauvel 900481b7fa
Improve hover and focus style in columns settings (#16222)
* Make focus visible on switches and text buttons in columns settings

* Make hover/focus visible on left/right arrows in columns settings

Use same style as for station action bar (reply/boost/fav/etc.)

* Tab first to “Pin/Unpin” before left/right arrows in columns settings
2021-10-01 00:55:51 +02:00
Claire b31748a496 Fix clicking on account name in “[xxx] boosted” text leading to broken path 2021-09-30 12:31:08 +02:00
Claire 56f9c44f33 Merge branch 'main' into glitch-soc/merge-upstream 2021-09-30 11:45:13 +02:00
Claire 24f9ea7818
Fix webauthn secure key authentication (#16792)
* Add tests

* Fix webauthn secure key authentication

Fixes #16769
2021-09-30 05:26:29 +02:00
Mashiro 2e549fa2d5
Fix drawer tab menu routes in advanced web ui (#16793) 2021-09-30 05:19:08 +02:00
Claire 29b5c5f483 Merge branch 'main' into glitch-soc/merge-upstream
Conflicts:
- `app/models/custom_emoji.rb`:
  Slight refactor upstream, next to a line that was different in glitch-soc
  because of our local configurable limits on custom emoji size.
  Ported upstream changes.
- `yarn.lock`:
  Not really a conflict, upstream dependency textually too close to a
  glitch-soc-only dependency.
  Updated upstream dependency as upstream.
2021-09-30 00:01:20 +02:00
Claire fc3ae1343d
Switch from unmaintained paperclip to kt-paperclip (#16724)
* Switch from unmaintained paperclip to kt-paperclip

* Drop some compatibility monkey-patches not required by kt-paperclip

* Drop media spoof check monkey-patching

It's broken with kt-paperclip and hopefully it won't be needed anymore

* Fix regression introduced by paperclip 6.1.0

* Do not rely on pathname to call FastImage

* Add test for ogg vorbis file with cover art

* Add audio/vorbis to the accepted content-types

This seems erroneous as this would be the content-type for a vorbis stream
without an ogg container, but that's what the `marcel` gem outputs, so…

* Restore missing for_as_default method

* Refactor Attachmentable concern and delay Paperclip's content-type spoof check

Check for content-type spoofing *after* setting the extension ourselves, this
fixes a regression with kt-paperclip's validations being more strict than
paperclip 6.0.0 and rejecting some Pleroma uploads because of unknown
extensions.

* Please CodeClimate

* Add audio/vorbis to the unreliable set

It doesn't correspond to a file format and thus has no extension associated.
2021-09-29 23:52:36 +02:00
Claire c4ccbbccab Fixup style issue 2021-09-28 13:24:34 +02:00
Claire 345b64340b [Glitch] Fix incorrect use of old WebUI paths
Port 6b19e1e632 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2021-09-28 13:07:27 +02:00
Claire 188d66c9a8 [Glitch] Add aliases for WebUI routes that were renamed in #16171
Port 11502ae46e to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2021-09-28 13:07:27 +02:00
Claire b2dd2e95ad Merge branch 'main' into glitch-soc/merge-upstream 2021-09-28 12:37:54 +02:00
Claire 6b19e1e632
Fix incorrect use of old WebUI paths (#16773)
* Fix incorrect use of old WebUI paths

PR #16171 renamed some routes but missed some occurrences.
Without #16772, this leads to unreachable routes in those cases.

* Fix floating action button being displayed on statuses and compose screen
2021-09-27 07:24:04 +02:00
Claire 11502ae46e
Add aliases for WebUI routes that were renamed in #16171 (#16772)
* Add aliases for some WebUI routes that were renamed in #16171

Accounts and statuses routes need more work as they use different parameters.

* Add aliases for /statuses/* routes

* Add aliases for /accounts/* WebUI routes

Does not correctly set the “active” state on the navigation tabs but this is
a minor issue.

* Fix some routes

* Fix /accounts/:id/{media,followers,following} not loading on legacy routes
2021-09-27 07:23:48 +02:00
Eugen Rochko a7f6524c6b [Glitch] Change routing paths to use usernames in web UI
Port 52e5c07948 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2021-09-26 21:35:57 +02:00
Claire 3622110778 Merge branch 'main' into glitch-soc/merge-upstream
Conflicts:
- `streaming/index.js`:
  Filtering code for streaming notifications has been refactored upstream, but
  glitch-soc had similar code for local-only toots in the same places.
  Ported upstream changes, but did not refactor local-only filtering.
2021-09-26 18:28:59 +02:00
Eugen Rochko a0d4129893
Refactor notifications to go through a separate stream in streaming API (#16765)
Eliminate need to have custom notifications filtering logic in the
streaming API code by publishing notifications into a separate stream
and then simply using the multi-stream capability to subscribe to that
stream when necessary
2021-09-26 13:23:28 +02:00
Eugen Rochko 52e5c07948
Change routing paths to use usernames in web UI (#16171) 2021-09-26 05:46:13 +02:00
Claire bf827b17e1 Merge branch 'main' into glitch-soc/merge-upstream 2021-09-19 13:07:27 +02:00
Claire e0af97164a
Fix followers synchronization mechanism not working when URI has empty path (#16744)
Follow-up to #16510, forgot the controller exposing the actual followers…
2021-09-15 18:51:16 +02:00
Claire f1e6884d6b Merge branch 'main' into glitch-soc/merge-upstream 2021-09-14 13:50:30 +02:00
Claire db57bff11d
Stop setting a shortcode to newly-created media attachments (#16730)
* Stop setting a shortcode to newly-created media attachments

The WebUI has stopped using the “short media URL” in ages. This isn't used
anywhere except for mail notifications.

Deprecating it would allow us to eventually get rid of at least a database
column and corruption-prone index, as well as a controller.

* Fix tests
2021-09-13 18:59:37 +02:00
Claire 7aa4d481db Fix media icons not being added in CWs 2021-09-09 17:14:09 +02:00
Holger 209f8f3a60
use relative path for `scope` (#16714)
Use relative path for `scope` in web manifest to allow users use PWA correctly via alternate domains.
2021-09-08 23:33:36 +02:00
Claire 12cd097e7c
Fix addressing of remote groups' followers (#16700)
Fixes #16699
2021-09-08 23:33:23 +02:00
Claire 4a94f4127b Fix glitch-soc front-end not linking to the provided SOURCE_URL 2021-09-08 16:36:45 +02:00
Claire 6bbcd99f14 Fix media attachments not being displayed on polls
Fixes #1595
2021-09-08 16:36:30 +02:00
Claire f9185c72a9 Merge branch 'main' into glitch-soc/merge-upstream 2021-09-02 10:52:09 +02:00
Claire 2b18f7a943
Fix processing mentions to domains with non-ascii TLDs (#16689)
Fixes #16602
2021-09-01 22:06:40 +02:00
matildepark 39193be1c4 [Glitch] Fix follow request count to dynamically update
Port 79341d0f5f to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2021-08-27 11:31:09 +02:00
Claire 463d23dfd5 Merge branch 'main' into glitch-soc/merge-upstream 2021-08-27 11:29:03 +02:00
Truong Nguyen 7283a5d3b9
Explicitly set userVerification to discoraged (#16545) 2021-08-26 09:51:22 -05:00
Claire 94bcf45321
Fix authentication failures after going halfway through a sign-in attempt (#16607)
* Add tests

* Add security-related tests

My first (unpublished) attempt at fixing the issues introduced (extremely
hard-to-exploit) security vulnerabilities, addressing them in a test.

* Fix authentication failures after going halfway through a sign-in attempt

* Refactor `authenticate_with_sign_in_token` and `authenticate_with_two_factor` to make the two authentication steps more obvious
2021-08-25 22:52:41 +02:00
matildepark 79341d0f5f
Fix follow request count to dynamically update (#16652) 2021-08-25 17:46:29 +02:00
Daniel 5c21021176
Fix undefined variable for Auth::OmniauthCallbacksController (#16654)
The addition of authentication history broke the omniauth login with
the following error:

  method=GET path=/auth/auth/cas/callback format=html
  controller=Auth::OmniauthCallbacksController action=cas status=500
  error='NameError: undefined local variable or method `user' for
  #<Auth::OmniauthCallbacksController:0x00000000036290>
  Did you mean?  @user' duration=435.93 view=0.00 db=36.19

* app/controllers/auth/omniauth_callbacks_controller.rb: fix variable
  name to `@user`
2021-08-25 17:40:56 +02:00
Claire 1aca5ef9bc Merge branch 'main' into glitch-soc/merge-upstream 2021-08-20 16:14:45 +02:00
Claire 3c45dfa0fe
Fix “discoverable” account setting being tied to profile directory (#16637) 2021-08-20 16:11:58 +02:00
Claire 4f074b68ba [Glitch] Fix crash if a notification contains an unprocessed media attachment
Port 0c24c865b7 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2021-08-20 13:14:59 +02:00
Claire 0e62c38b02 [Glitch] Fix download button color in audio player
Port aaf24d3093 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2021-08-20 13:14:03 +02:00
Claire 4e2a8c9b38 Merge branch 'main' into glitch-soc/merge-upstream 2021-08-20 13:01:50 +02:00
Claire 9ac7e6fef7
Fix remotely-suspended accounts' toots being merged back into timelines (#16628)
* Fix remotely-suspended accounts' toots being merged back into timelines

* Mark remotely-deleted accounts as remotely suspended
2021-08-20 07:40:33 +01:00
Holger 0cae6c07bb
Fix #16603 (#16605)
Fix issue #16603 undefined method `serialize_payload' for Unsuspend Account Service error.
It seems that this service forgot to `include Payloadable` so that `serialize_payload` could not be found in this service.
2021-08-20 07:39:37 +01:00
Claire 0c24c865b7
Fix crash if a notification contains an unprocessed media attachment (#16573)
* Refactor AttachmentList

* Do not crash if a notification contains an unprocessed media attachment

Fixes #16530

* Fix spacing in compact form
2021-08-11 17:49:10 +02:00
Claire aaf24d3093
Fix download button color in audio player (#16572)
Fixes #16571
2021-08-11 17:48:55 +02:00
Claire 5efb1ff337
Fix followers synchronization mechanism not working when URI has empty path (#16510)
* Fix followers synchronization mechanism not working when URI has empty path

To my knowledge, there is no current implementation on the fediverse
that can use bare domains (e.g., actor is at https://example.org instead of
something like https://example.org/actor) that also plans to support the
followers synchronization mechanism. However, Mastodon's current implementation
would exclude such accounts from followers list.

Also adds tests and rename them to reflect the proper method names.

* Move url prefix regexp to its own constant
2021-08-11 17:48:42 +02:00
Claire 47ea9b2d67 Merge branch 'main' into glitch-soc/merge-upstream 2021-08-11 16:41:59 +02:00
Claire 13b08610a0
Fix crash when encountering invalid account fields (#16598)
* Add test

* Fix crash when encountering invalid account fields
2021-08-11 16:40:55 +02:00
Takeshi Umeda 8681ef85d0 [Glitch] Fix logout link not working in safari
Port b2875b1864 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2021-08-09 23:45:58 +02:00
Jeong Arm 8d55cb7d71 [Glitch] Fix trends layout
Port 6e0ab6814f to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2021-08-09 23:40:31 +02:00
Claire 76c7226eb0 Fix account statuses cleanup settings controller for glitch-soc's theming system 2021-08-09 23:28:06 +02:00
Claire 8ec4be4233 Merge branch 'main' into glitch-soc/merge-upstream
Conflicts:
- `Gemfile.lock`:
  Not a real conflict, upstream-updated dependency (redis) textually too
  close to glitch-soc-only dependecy.
  Updated redis gem like upstream did.
2021-08-09 23:25:49 +02:00
Claire 4ac78e2a06
Add feature to automatically delete old toots (#16529)
* Add account statuses cleanup policy model

* Record last inspected toot to delete to speed up successive calls to statuses_to_delete

* Add service to cleanup a given account's statuses within a budget

* Add worker to go through account policies and delete old toots

* Fix last inspected status id logic

All existing statuses older or equal to last inspected status id must be
kept by the current policy. This is an invariant that must be kept so that
resuming deletion from the last inspected status remains sound.

* Add tests

* Refactor scheduler and add tests

* Add user interface

* Add support for discriminating based on boosts/favs

* Add UI support for min_reblogs and min_favs, rework UI

* Address first round of review comments

* Replace Snowflake#id_at_start with with_random parameter

* Add tests

* Add tests for StatusesCleanupController

* Rework settings page

* Adjust load-avoiding mechanisms

* Please CodeClimate
2021-08-09 23:11:50 +02:00
Takeshi Umeda 709876bd6c
Fix invalid blurhash handling in Create activity (#16583) 2021-08-09 13:33:19 +02:00
Takeshi Umeda 590e1578bf
Fix when MoveWorker cannot get locale from remote account (#16576) 2021-08-08 15:31:02 +02:00
Claire 763ab0c7eb
Fix owned account notes not being deleted when an account is deleted (#16579)
* Add account_notes relationship

* Add tests

* Fix owned account notes not being deleted when an account is deleted

* Add post-migration to clean up orphaned account notes
2021-08-08 15:29:57 +02:00
Jeong Arm a61645ed30 Add missing Korean translations 2021-08-06 20:06:05 +02:00
Jeong Arm 69b5139d2a Add Korean translations 2021-08-06 20:06:05 +02:00
Takeshi Umeda b2875b1864
Fix logout link not working in safari (#16574) 2021-08-06 12:14:13 +02:00
Jeong Arm 6e0ab6814f
Fix trends layout (#16570) 2021-08-05 13:05:32 +02:00
Claire 2f6ff14198 [Glitch] Fix crashes with Microsoft Translate on Microsoft Edge
Port e9659ae031 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2021-07-25 13:04:59 +02:00
Claire 34a573ac27 [Glitch] Add confirmation modal when closing media edit modal with unsaved changes
Port a8a7066e97 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2021-07-25 12:59:03 +02:00
Claire 08139d3cd7 [Glitch] Fix “open” link of media modal not closing modal
Port af08229ff4 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2021-07-25 12:51:33 +02:00
Claire b5e10d07ff Merge branch 'main' into glitch-soc/merge-upstream 2021-07-25 12:48:48 +02:00
Claire a8a7066e97
Add confirmation modal when closing media edit modal with unsaved changes (#16518)
* Add confirmation modal when closing media edit modal with unsaved changes

* Move focal point media state to redux so it does not get erased by confirmation dialog

* Change upload modal behavior to keep it open while saving changes

Instead of closing it immediately and losing changes if they fail to save…

* Make it work with react-intl 2.9
2021-07-25 01:14:43 +02:00
Claire af08229ff4
Fix “open” link of media modal not closing modal (#16524) 2021-07-25 01:13:46 +02:00
Claire 1d67acb72f
Fix scoped order warning in RemoveStatusService (#16531)
Fixes “Scoped order is ignored, it's forced to be batch order.”
2021-07-24 14:41:46 +02:00
Claire e9659ae031
Fix crashes with Microsoft Translate on Microsoft Edge (#16525)
Fixes #16509

Microsoft Edge with translation enabled rewrites the DOM in ways that confuse
react and prevent it from working properly. Wrapping the offending parts in
a span avoids this issue.
2021-07-23 02:53:17 +02:00
Claire d8629e7b86
Add logging of S3-related errors (#16381) 2021-07-21 18:34:39 +02:00
Claire d1c87be8cf Merge branch 'main' into glitch-soc/merge-upstream 2021-07-17 17:45:35 +02:00
Claire e54a65013d
Fix replying from modal (#16516)
Fixes #16515

Not using a router object somehow made `this.history` lag behind the real
browser history whenever pushing a new history item in `replyCompose`.

Not using the context-provided router in this case was an oversight made
when porting glitch-soc changes in #16499.
2021-07-17 17:06:52 +02:00
Claire 211d5c3c30
Fix inefficiencies in auto-linking code (#16506)
The auto-linking code basically rewrote the whole string escaping non-ascii
characters in an inefficient way, and building a full character offset map
between the unescaped and escaped texts before sending the contents to
TwitterText's extractor.

Instead of doing that, this commit changes the TwitterText regexps to include
valid IRI characters in addition to valid URI characters.
2021-07-15 15:56:58 +02:00
Claire 3dcf3f2a3a
Fix minor code quality issues (#16502) 2021-07-14 05:36:23 +02:00
Claire 30ce6e395c
Fix user email address being banned on self-deletion (#16503)
* Add tests

* Fix user email address being banned on self-deletion

Fixes #16498
2021-07-14 05:35:49 +02:00
Claire fc500a6062 Merge branch 'main' into glitch-soc/merge-upstream
Conflicts:
- `CONTRIBUTING.md`:
  Upstream file has changed and we're quoting it.
  Ported the changes.
- `README.md`:
  Upstream file has changed but we have a completely different one.
  Kept our version.
- `lib/mastodon/version.rb`:
  Upstream has changed from `tootsuite/mastodon` to `mastodon/mastodon`,
  but we're still `glitch-soc/mastodon`.
  Kept our version.
- `spec/presenters/instance_presenter_spec.rb`:
  Upstream has changed from `tootsuite/mastodon` to `mastodon/mastodon`,
  but we're still `glitch-soc/mastodon`.
  Kept our version.
2021-07-13 17:57:15 +02:00
Claire 5a1e072517
Change references to tootsuite/mastodon to mastodon/mastodon (#16491)
* Change references to tootsuite/mastodon to mastodon/mastodon

* Remove obsolete test fixture

* Replace occurrences of tootsuite/mastodon with mastodon/mastodon in CHANGELOG

And a few other places
2021-07-13 15:46:20 +02:00
Claire d3791cca0c
Improve modal flow and back button handling (#16499)
* Refactor shouldUpdateScroll passing

So far, shouldUpdateScroll has been manually passed down from the very top of
the React component hierarchy even though it is a static function common to
all ScrollContainer instances, so replaced that with a custom class extending
ScrollContainer.

* Generalize “press back to close modal” to any modal and to public pages

* Fix boost confirmation modal closing media modal
2021-07-13 15:45:17 +02:00
Claire e4270cb55a Please CodeClimate 2021-07-13 13:49:40 +02:00
Claire 19ea6618b1 Small scroll/history behavior fixup to take weird browser patterns into account 2021-07-13 13:21:00 +02:00
Claire 84fbe4d030 Refactor shouldUpdateScroll stuff 2021-07-13 12:51:06 +02:00
Claire 99f28c17de Fix scroll handling with modals 2021-07-13 11:07:16 +02:00
Claire 6e3d5cbca2 Fix and simplify browser history handling in relation to modals
This simplifies the logic to:
- when the last modal gets closed and we're in our history buffer state, go back
- whenever a modal is open, ensure we're in a history buffer state by
  potentially pushing one
2021-07-12 20:13:02 +02:00
Claire c5b4e6b708 Add modal stack to allow better boost modal and media modal interaction. 2021-07-12 17:00:14 +02:00
Claire ddf3f4cf85 Fix clicking on the pop-up player placeholder expanding the clicked toot 2021-07-12 16:24:53 +02:00
Claire a85eb7d930 Fix follow suggestions scrolling on mobile view
Also simplify the CSS a bit and bring it closer to upstream.
2021-07-12 10:22:57 +02:00
Claire cdf20f4367 Merge branch 'main' into glitch-soc/merge-upstream
Conflicts:
- `app/serializers/rest/instance_serializer.rb`:
  Upstream changed the fields returned by /api/v1/instance by adding a
  `configuration` field holding a lot of useful information making our
  `max_toot_chars` and `poll_limits` fields obsolete.
  Keeping those around for now for compatibility.
- `app/validators/status_length_validator.rb`:
  No real conflict, just URL_PLACEHOLDER_CHARS introduced too close to
  MAX_CHARS which is defined differently in glitch-soc.
  Ported upstream changes.
2021-07-11 21:41:23 +02:00
Eugen Rochko 7095c80373
Add ability to filter reports by origin of target account (#16487) 2021-07-11 11:01:38 +02:00
Eugen Rochko 275fa4746b
Add `configuration` attribute to `GET /api/v1/instance` (#16485)
List various values like file size limits and supported mime types
2021-07-10 17:58:41 +02:00
Claire 101f8616fe [Glitch] Fix pop-in player display when poster has long username or handle
Port 1381e0e1d9 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2021-07-08 16:23:09 +02:00
Claire 3160e050a9 Merge branch 'main' into glitch-soc/merge-upstream
Conflicts:
- `app/helpers/accounts_helper.rb`:
  Conflict due to upstream changing how followers count is displayed while we
  have an option to hide followers count.
  Ported upstream change.
- `app/views/accounts/_header.html.haml`:
  Conflict due to upstream changing how followers count is displayed while we
  have an option to hide followers count.
  Ported upstream change.
- `app/views/directories/index.html.haml`:
  Conflict due to upstream changing how followers count is displayed while we
  have an option to hide followers count.
  Ported upstream change.
2021-07-08 16:17:19 +02:00
Eugen Rochko 771c9d4ba8
Add ability to skip sign-in token authentication for specific users (#16427)
Remove "active within last two weeks" exception for sign in token requirement

Change admin reset password to lock access until the password is reset
2021-07-08 05:31:28 +02:00
Claire 8569126c2e
Fix upgrade path from 3.4.0 (#16465)
3.4.1 dropped account_stats.lock_version, but in a way breaking the usual
upgrade path by requiring services to be reloaded after the post-migrations.

Indeed, `self.locking_column = nil` was not enough for Rails to ignore the
`lock_version` column when preparing statements on application load, resulting
in some ActiveRecord queries (typically those involving
`includes(:account_stat)`) erroring out with:

  ActiveRecord::StatementInvalid (PG::UndefinedColumn: ERROR:  column account_stats.lock_version does not exist
2021-07-07 21:13:30 +02:00
Claire e2844b7e58
Change number_to_human calls to always use 3-digits precision (#16469)
Fixes #16435
2021-07-07 21:13:08 +02:00