Commit graph

435 commits

Author SHA1 Message Date
Eugen Rochko
85740837c6 Bump version to 3.4.0 (#16239) 2021-05-16 23:55:07 +02:00
Claire
2934b06a25 Update fix-duplicates maintenance script to support latest migrations (#16231)
* Update maintenance script to support latest database migrations

* Update Account#merge_with!
2021-05-12 23:19:44 +02:00
Eugen Rochko
cafaf8e783 Bump version to 3.4.0rc2 (#16206) 2021-05-10 22:23:48 +02:00
Takeshi Umeda
00f4204d05 Add a Redis environment variable for sidekiq (#16188) 2021-05-09 10:40:17 +02:00
Eugen Rochko
0245174bae Bump version to 3.4.0rc1 (#16053) 2021-05-08 17:15:06 +02:00
Claire
bb69774177 Fix older migrations on Ruby 3 (#16174) 2021-05-07 15:56:45 +02:00
Takeshi Umeda
7bcd4a83f8 Fix how to change connection pool for rails 6 (#16158)
* Fix how to change connection pool for rails 6

* Fix to match the code elsewhere
2021-05-05 04:41:10 +02:00
Takeshi Umeda
465434aac8 Fix cache redis not being used (#16131) 2021-04-29 15:43:49 +02:00
abcang
57d0cb0002 Fix DB connection pool settings in CLI (#15983) 2021-03-31 17:46:17 +02:00
Stanislas
9c85025a11 tootctl emoji import: case insensitive duplicate check (#15738) 2021-03-24 10:55:16 +01:00
Claire
7d180ee89c Remove MySQL-specific code from Mastodon::MigrationHelpers (#15924)
Mastodon::MigrationHelpers has been forked from Gitlab a long time ago, but
Mastodon has never supported using a MySQL database.

Removing MySQL support from Mastodon::MigrationHelpers makes it a little easier
to maintain. In particular, it removes code that would need updating with
Rails 6.
2021-03-19 13:14:40 +01:00
Claire
02e721757e Change deduplication order of tootctl maintenance fix-duplicates (#15923)
Hopefully fixes #15922

Also update support up to latest database schema version
2021-03-19 11:07:56 +01:00
Claire
6024c263bf Further preparation for Rails 6 (#15916)
* Use ActiveRecord::Result#to_ary instead of deprecated to_hash

They do the same thing, and to_hash has been removed from Rails 6.1

* Explicitly name polymorphic indexes to workaround a bug in Rails 6.1

cf. https://github.com/rails/rails/issues/41693

* Fix incorrect usage of “foreign_key” in migration script

* Use `ActiveModel::Errors#delete` instead of deprecated clear method

* Fix link headers tests on Rails 6.1

Rails 6.1 adds values to the Link header by default, thus it is not a
LinkHeader object anymore. Fix the test to parse the Link header instead
of assuming it is a LinkHeader.
2021-03-19 02:45:34 +01:00
Claire
1634e71bd6 Prepare Mastodon for Rails 6 (#15911)
* Fix misuse of foreign_type

* Fix use of removed "add_template_helper"

* Use response.media_type instead of response.content_type in tests

* Fix CSV export controller test on Rails 6

Rails 6 sets a "filename*" field in the Content-Disposition header to
explicitly encode the filename as UTF-8.

This changes checks the first part of the Content-Disposition header so
it matches in both Rails 5 and Rails 6.

* Fix emoji formatting with Rails 6

* Make emoji output more idiomatic and robust

* Switch from redis-rails gem to built-in Rails redis cache storage
2021-03-17 10:09:55 +01:00
Shubhendra Singh Chauhan
daea469385 Fixed code quality issues (#15541)
* Added .deepsource.toml

* Removed bad use of `alias`

* Fixed operand order in the binary expression

* Prefixed unused method arguments with an underscore

* Replaced the old OpenSSL algorithmic constants with the newer strings initializers.

* Removed unnecessary UTF-8 encoding comment
2021-01-31 21:26:09 +01:00
ThibG
aa34a9519e Fix “tootctl accounts unfollow” (#15639)
Fixes #15635

Co-authored-by: Claire <claire.github-309c@sitedethib.com>
2021-01-29 18:38:56 +01:00
luigi
c19fe86d66 Optimize some regex matching (#15528)
* Use Regex#match?

* Replace =~ too

* Avoid to call match? from Nil

* Keep value of Regexp.last_match
2021-01-22 10:09:08 +01:00
ThibG
2582047c36 Use Rails' index_by where it makes sense (#15542)
* Use Rails' index_by where it makes sense

* Fix tests

Co-authored-by: Claire <claire.github-309c@sitedethib.com>
2021-01-12 09:27:38 +01:00
ThibG
745e925324 Fix maintenance script not re-indexing some indexes on textual values (#15515)
* Fix maintenance script not re-indexing some indexes on textual values

Fixes #15475

* Refresh instance view at the end of the maintenance script run

Co-authored-by: Claire <claire.github-309c@sitedethib.com>
2021-01-09 03:51:32 +01:00
Sophie Parker
cac62ce88b Improve Emoji import (fix #15429) (#15430)
* Improve Emoji import

Skip macOS '._' shadow files in tar archive to speed up import

* Fix codeclimate format issue with whitespace

* Update lib/mastodon/emoji_cli.rb

suggestions from Gargron to improve comment

Co-authored-by: Eugen Rochko <eugen@zeonfederated.com>

* Update emoji_cli.rb

Remove extraneous comment (macOS-specific comment now with correct line)

Co-authored-by: Eugen Rochko <eugen@zeonfederated.com>
2020-12-30 23:19:55 +01:00
Eugen Rochko
43a1c6f9d7 Bump version to 3.3.0 (#15433) 2020-12-27 06:00:55 +01:00
ThibG
82d014fd08 Fix being able to import more than allowed number of follows (#15384)
* Fix being able to import more than allowed number of follows

Without this commit, if someone tries importing a second list of accounts to
follow before the first one has been processed, this will queue imports for
the two whole lists, even if they exceed the account's allowed number of
outgoing follows.

This commit changes it so the individual queued imports aren't exempt from
the follow limit check (they remain exempt from the rate-limiting check
though).

* Catch validation errors to not re-queue failed follows

Co-authored-by: Claire <claire.github-309c@sitedethib.com>
2020-12-26 23:52:46 +01:00
Eugen Rochko
dcb4c20fc1 Bump version to 3.3.0rc3 (#15411) 2020-12-23 01:36:13 +01:00
ThibG
f894bb9220 Fix external user creation failing when invite request text is required (#15405)
* Fix external user creation failing when invite request text is required

Also fixes tootctl-based user creation.

* Add test about invites when invite request text is otherwise required

Co-authored-by: Claire <claire.github-309c@sitedethib.com>
2020-12-22 17:14:32 +01:00
ThibG
7eee08cab7 Fix "tootctl accounts fix-duplicates" (#15373)
- `pluck_each` cannot be used this way with `group`
- typo

Co-authored-by: Claire <claire.github-309c@sitedethib.com>
2020-12-19 13:34:16 +01:00
Eugen Rochko
1fad538057 Bump version to 3.3.0rc2 (#15365) 2020-12-19 00:28:38 +01:00
ThibG
0b3e9c1e4c Fix resolving accounts sometimes creating duplicate records for a given AP id (#15364)
* Fix ResolveAccountService accepting mismatching acct: URI

* Set attributes that should be updated regardless of suspension

* Fix key fetching

* Automatically merge remote accounts with duplicate `uri`

* Add tests

* Add "tootctl accounts fix-duplicates"

Finds duplicate accounts sharing a same ActivityPub `id`, re-fetch them and
merge them under the canonical `acct:` URI.

Co-authored-by: Claire <claire.github-309c@sitedethib.com>
2020-12-18 23:26:26 +01:00
ThibG
b2f4a8d645 Bump max supported schema version in maintenance script (#15359)
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
2020-12-18 09:46:59 +01:00
ThibG
4abb01097d Bump max supported schema version in maintenance script (#15349)
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
2020-12-15 12:57:24 +01:00
Eugen Rochko
df8874b24e Fix performance on instances list in admin UI (#15282)
- Reduce duplicate queries
- Remove n+1 queries
- Add accounts count to detailed view
- Add separate action log entry for updating existing domain blocks
2020-12-14 09:06:34 +01:00
ThibG
1fce69291f Fix account merging in maintenance script (#15264)
Also include AccountNote and AccountDeletionRequest to the list of classes
needing to be reassigned the merged account.
2020-12-04 02:23:51 +01:00
ThibG
27a1419a65 Fix tootctl ip_blocks add failing if not given a comment (#15263)
Fixes #15261
2020-12-02 21:19:41 +01:00
Eugen Rochko
2207431f39 Bump version to 3.3.0rc1 (#15230) 2020-12-01 06:38:05 +01:00
Eugen Rochko
77aba785e9 Bump version to 3.2.1 (#15227) 2020-11-27 18:29:22 +01:00
Eugen Rochko
876df5bb18 Add tootctl accounts merge (#15201)
* Add `tootctl accounts merge`

* Update lib/mastodon/accounts_cli.rb

Co-authored-by: Yamagishi Kazutoshi <ykzts@desire.sh>

Co-authored-by: Yamagishi Kazutoshi <ykzts@desire.sh>
2020-11-23 17:50:16 +01:00
ThibG
14da84d0dc Deal with collation-related index corruption (#14860)
* Add tootctl maintenance fix-duplicates

This tool goes through the database to detect and fix duplicates.
This operation is very slow and may cause data loss (of data that would be
inaccessible without intervention because of the existing index corruptions).
It tries its best to make sensible decisions, and asks the user in some cases.

* Add warning message in db:migrate hook

* Clear Rails cache after being done with database deduplication

Avoids followers hash cache being incorrect, among other things
2020-11-19 17:37:49 +01:00
Eugen Rochko
38be9af436 Add support for reversible suspensions through ActivityPub (#14989) 2020-11-08 00:28:39 +01:00
Eugen Rochko
da4c730c47 Add IP-based rules (#14963) 2020-10-12 16:33:49 +02:00
Eugen Rochko
e514304a76 Change account suspensions to be reversible by default (#14726) 2020-09-15 14:37:58 +02:00
Y.Yamashiro
78feafaa85 Change S3 ACL in "tootctl media remove-orphans --fix-permissions" from fixed value to environment file's value. (#14715) 2020-09-02 00:17:58 +02:00
Eugen Rochko
dc2ea5223b Add --fix-permissions option to tootctl media remove-orphans (#14383) 2020-09-01 03:33:21 +02:00
dependabot[bot]
61b768572e Bump rubocop from 0.86.0 to 0.88.0 (#14412)
* Bump rubocop from 0.86.0 to 0.88.0

Bumps [rubocop](https://github.com/rubocop-hq/rubocop) from 0.86.0 to 0.88.0.
- [Release notes](https://github.com/rubocop-hq/rubocop/releases)
- [Changelog](https://github.com/rubocop-hq/rubocop/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop-hq/rubocop/compare/v0.86.0...v0.88.0)

Signed-off-by: dependabot[bot] <support@github.com>

* Fix for latest RuboCop

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Yamagishi Kazutoshi <ykzts@desire.sh>
2020-09-01 03:04:00 +02:00
Takeshi Umeda
e0b8201f67 Fix an error when file_file_size is nil in tootctl media remove (#14657) 2020-08-24 18:09:46 +02:00
ThibG
8baad22f68 Improve email address validation (#14565)
* Increase DNS timeout from 1 second to 5 seconds for MX check

1 seconds is rather short when using a recursive DNS resolver which
hasn't got a cached result already available. Use 5 seconds instead,
which is the timeout value we use for outgoing HTTP queries.

* Add more precise error messages for invalid e-mail addresses
2020-08-12 12:40:25 +02:00
ThibG
ccb975df83 Fix tootctl media commands not handling snowflake ids for media_attachments (#14536) 2020-08-10 01:51:06 +02:00
Eugen Rochko
f089dd55ef Bump version to 3.2.0 (#14395) 2020-07-27 00:07:26 +02:00
Eugen Rochko
1959db3fd1 Bump version to 3.2.0rc2 (#14382) 2020-07-24 18:47:25 +02:00
Eugen Rochko
6391e1e302 Bump version to 3.2.0rc1 (#14312) 2020-07-15 21:07:27 +02:00
Eugen Rochko
09caf7e22e Change tootctl search deploy algorithm (#14300) 2020-07-14 18:10:35 +02:00
Eugen Rochko
c3ef166b61 Bump version to 3.1.5 (#14284) 2020-07-10 21:07:30 +02:00
Eugen Rochko
a3ce01a102 Add customizable thumbnails for audio and video attachments (#14145)
- Change audio files to not be stripped of metadata
- Automatically extract cover art from audio if it exists
- Add `thumbnail` parameter to `POST /api/v1/media`, `POST /api/v2/media` and `PUT /api/v1/media/:id`
- Add `icon` to represent it in attachments in ActivityPub
- Fix `preview_url` containing URL of missing missing image when there is no thumbnail instead of null
- Fix duration of audio not being displayed on public pages until the file is loaded
2020-06-29 13:56:55 +02:00
Eugen Rochko
42d2f45db1 Remove the terms blacklist and whitelist from UX (#14149)
Localization strings:

- "Whitelist mode" -> "Limited federation mode"
- "Blacklist e-mail domain" -> "Block e-mail domain"
- "Whitelist domain" -> "Allow domain for federation"

...And so on

Environment variables (backwards-compatible):

- `WHITELIST_MODE` -> `LIMITED_FEDERATION_MODE`
- `EMAIL_DOMAIN_BLACKLIST` -> `EMAIL_DOMAIN_DENYLIST`
- `EMAIL_DOMAIN_WHITELIST` -> `EMAIL_DOMAIN_ALLOWLIST`

tootctl:

- `tootctl domains purge --whitelist-mode` -> `tootctl domains purge --limited-federation-mode`

Removed badly maintained and no longer relevant .env.production.sample file
2020-06-27 20:20:11 +02:00
Eugen Rochko
85ecbd5527 Fix help text around tootctl email_domain_blocks (#14147) 2020-06-26 21:28:40 +02:00
tateisu
29ddd0cdf7 Add tootctl email-domain-blocks (#13589)
* Add tootctl email_domains (block|unblock)

* fix codeclimate issues.

* fix codeclimate issues.

* fix codeclimate issues.

* add list subcommand, remove log_action.

* fix codeclimate issues.

* filter duplicate hostnames,ips before block

* rebase from currnet master branch.
rename email_domains_cli.rb to email_domain_blocks_cli.rb .
rename Mastodon::EmailDomainsCLI to Mastodon::EmailDomainBlocksCLI .
rename command email_domains to email-domain-blocks . (Thor recognizes both of - and _ )
rename subcommand block to add .
rename subcommand unblock to remove .
change the color in list subcommand to while for domain or cyan for childlen.
don't use include() in list subcommand.
suppress console output about succeeded entry.
add console output about count of processed/skipped.
remove capitalization in subcommand description.
remove long_desc in subcommand 'remove'.
remove duplicate where in subcommand 'remove'.

* fix codeclimate issue.
2020-06-25 12:17:10 +02:00
Stanislas
acb71734fb Fix tootctl upgrade storage-schema S3 ACL (#13768) 2020-05-17 17:27:36 +02:00
Eugen Rochko
7e7613ec9c Fix tootctl media remove-orphans choking on unknown files in storage (#13765)
Fix #13762

Catch tootctl interrupt to prevent confusing stacktrace
2020-05-15 18:41:27 +02:00
Eugen Rochko
b2488c3d77 Fix tootctl upgrade storage-schema misbehaving (#13761)
- Fix not moving original files of custom emojis
- Fix command failing to move any files with S3 storage
- Fix command marking records as upgraded when move failed

Fix #13594
2020-05-15 17:15:24 +02:00
Eugen Rochko
5525f6efb7 Bump version to 3.1.4 (#13750) 2020-05-14 07:46:11 +02:00
Takeshi Umeda
27a938101c Fix tootctl media refresh (#13751) 2020-05-14 07:45:52 +02:00
ThibG
b7f47014a7 Fix "tootctl media remove-orphans" crashing on “Import” files (#13685)
* Fix "tootctl media remove-orphans" crashing on “Import” files

* Also remove empty directories when removing orphaned media
2020-05-09 21:06:55 +02:00
Hanage999
190768a28d Fix tootctl upgrade storage-schema failing to delete empty directories (#13593) 2020-05-04 13:51:34 +02:00
Lerk
0dd63eae8e Add tootctl emoji export (#13534)
* add emoji export command to cli

* fix codeclimate issues

* add error when no matching category was found

* add other suggestions

* exit 1 when no matching category is found

* changes according to suggestions

* 👀

* RubyNein

Y u always autoformat :c
2020-04-27 22:17:49 +02:00
Eugen Rochko
adfb22a9dd Add separate cache directory for non-local uploads (#12821) 2020-04-26 23:29:08 +02:00
Eugen Rochko
ccee0578a4 Fix regression in tootctl media remove-orphans (#13405)
Fix #13401
2020-04-06 14:11:47 +02:00
Eugen Rochko
c7c2a46967 Bump version to 3.1.3 (#13389) 2020-04-05 06:23:46 +02:00
Eugen Rochko
7045cb5d5c Fix tootctl media remove-orphans ignoring PAPERCLIP_ROOT_PATH (#13375)
Fix #13371
2020-04-02 05:28:51 +02:00
Eugen Rochko
1cb4645638 Change tootctl media remove-orphans to work for all classes (#13316)
Change `tootctl media lookup` to not use an interactive prompt
2020-03-26 01:56:41 +01:00
tateisu
03ad395296 Add --skip-media-remove option to tootctl statuses remove (#13080)
* Add skip_media_remove option to tootctl statuses remove

* Add skip_media_remove option to tootctl statuses remove

Co-authored-by: tateisu <tateisu@juggler.jp>
2020-03-08 16:01:07 +01:00
ThibG
6e937a13a8 Fix installation failing when Redis password contains special characters (#13156)
* Add support for special characters in Redis passwords

Fixes #13154

* Refactor
2020-02-29 03:00:43 +01:00
Eugen Rochko
1a74ffed23 Bump version to 3.1.2 (#13162) 2020-02-27 12:34:07 +01:00
ThibG
5ad9ee92f6 Add --reset-password option to tootctl accounts modify (#13126) 2020-02-22 01:29:14 +01:00
Marcin Cieślak
dc6fbdb6c9 Do not suggest to login into the GitLab database (#13084)
As pointed out on Discourse:

https://discourse.joinmastodon.org/t/obscure-wtf-error-message-running-migrations-for-3-1/2524

The message the administrators were getting was telling them
to log in to the "GitLab database" and also mentions MySQL
2020-02-15 12:52:57 +01:00
Eugen Rochko
28a4b27a41 Bump version to 3.1.1 (#13069) 2020-02-10 02:55:40 +01:00
Eugen Rochko
5cbbe3c3d5 Bump version to 3.1.0 (#13053) 2020-02-09 00:02:08 +01:00
Eugen Rochko
6355996c4b Bump version to 3.1.0rc2 (#12999) 2020-01-28 20:56:32 +01:00
Eugen Rochko
35ea75898c Bump version to 3.1.0rc1 (#12932) 2020-01-24 01:14:51 +01:00
Gomasy
b362a77e06 Keep statuses bookmarked by local users in tootctl statuses remove (#12818) 2020-01-11 06:41:37 +01:00
ThibG
5fbadcf9df Add --remote-only option to emoji purge (#12810)
Fixes #12804
2020-01-10 00:10:17 +01:00
ThibG
0b0f358815 Changes to tootctl statuses remove (#11267)
* Fix comments in statuses_cli

The comment for the part of query keeping statuses which have replies was
incorrect, explaining the part of the query kept favourited statuses instead

* Keep statuses favourited by local users in tootctl statuses remove

* Do delete old replies that are not direct interactions with local users

* Skip reblogs of local statuses instead of all reblogs

* Optimize some queries

* Keep old statuses with recent reblogs

* Add option to clear toots from followed accounts too
2019-12-17 13:33:36 +01:00
trwnh
5b127ea614 Fix typo in tootctl statuses remove (#12603) 2019-12-12 19:50:08 +01:00
Eugen Rochko
fa15a5e9f2 Fix error handling in tootctl media remove-orphans (#12571) 2019-12-09 04:26:00 +01:00
Eugen Rochko
0769ef8277 Add tootctl media remove-orphans (#12568) 2019-12-08 15:37:12 +01:00
Nathaniel Suchy
8ae8e9268e Add tootctl media lookup command (#12283)
* Add a lookup tool to the media cli

* Improved lookup logic

* Clarified wording in the output

* Code style changes

* Code style changes

* Code style changes

* Code style changes

* Add error handling code incase an attachment isn't found

* Code style changes

* Code style changes

* Make requested changes

* Fix styling issues

* Handle other media types

* Remove an inadvertently added log

* Make requested changes

* Make the code safe no matter what the path, S3 or not

* Code style changes

* Code style changes

* Replace select method with Ruby Enumerable grep method
2019-11-04 12:55:20 +01:00
Eugen Rochko
a4969d4b98 Bump version to 3.0.1 (#12116) 2019-10-09 07:36:57 +02:00
Eugen Rochko
347c82efed Change tootctl media refresh to skip already downloaded attachments (#12118) 2019-10-08 05:59:10 +02:00
Eugen Rochko
c47d7b8abf Add tootctl media usage command (#12115) 2019-10-07 20:04:56 +02:00
Eugen Rochko
7e13c7c710 Fix tootctl not allocating enough database connections for main thread (#12097) 2019-10-07 05:05:02 +02:00
Eugen Rochko
17c2205247 Fix issues with tootctl's parallelization and progress reporting (#12093) 2019-10-07 04:24:05 +02:00
Jeong Arm
9fbb97a0c8 Remove unused option from tootctl accounts cull (#12074) 2019-10-06 04:30:07 +02:00
Eugen Rochko
74ddddd3db Bump version to 3.0.0 (#12000) 2019-10-03 22:44:22 +02:00
Eugen Rochko
6edcffbb9f Bump version to 3.0.0rc3 (#12063) 2019-10-03 04:13:22 +02:00
Takeshi Umeda
38d2632b90 Add parallelization to tootctl search deploy (#12051)
* Add parallel gem

* Modify parallel option in tootctl search deploy

* Add paralell option to tootctl search deploy

* Change 1 to false

* Clean up

* Rename --parallel to --processes
2019-10-02 21:50:43 +02:00
Eugen Rochko
36199a7bd6 Change tootctl domains purge to accept multiple domains at once (#12046) 2019-10-02 04:49:53 +02:00
Eugen Rochko
7918c98190 Bump version to 3.0.0rc2 (#11999) 2019-09-29 18:50:16 +02:00
Eugen Rochko
c64f143bf7 Bump version to 3.0.0rc1 (#11900) 2019-09-21 20:02:14 +02:00
Eugen Rochko
40d33e780e Bump version to 2.9.3 (#11899) 2019-09-20 22:59:29 +02:00
Eugen Rochko
4291b74031 Change deletes to preserve soft-deleted statuses in unresolved reports (#11805)
Change all account actions except "none" to resolve all unresolved reports

Refactor `SuspendAccountService` to be more readable
2019-09-11 16:32:44 +02:00
Eugen Rochko
8eab4349b4 Add retry for failed media downloads and tootctl media refresh (#11775) 2019-09-10 15:29:12 +02:00
Eugen Rochko
666c1a8a06 Change tootctl to use inline parallelization instead of Sidekiq (#11776)
- Remove --background option
- Add --concurrency(=5) option
- Add progress bars
2019-09-10 13:48:48 +02:00
Eugen Rochko
3f5571301a Add tootctl cache recount command (#11597) 2019-08-18 14:55:03 +02:00
Stanislas
d67ad75a56 Limit "tootctl accounts follow" to local accounts (#11592)
To (somewhat) limit mass remote follow. Fix #11360
2019-08-17 22:59:40 +02:00
Darius Kazemi
ccef31901f Add option to exclude suspended domains/subdomains from tootctl domains crawl (#11454)
* Add "--exclude-suspended" to tootctl domains crawl

This new option ignores any instances suspended server-wide as
well as their associated subdomains. This queries all domain
blocks up front, then runs a regexp on each domain. This improves
performance over what may be the obvious implementation, which is
to ask `DomainBlocks.blocked?(domain)` for each domain -- this
hits the DB many times, slowing things down considerably.

* cleaning up code style

* Compiling regex

* Removing ternary operator
2019-08-03 19:11:09 +02:00
Eugen Rochko
825dc3ca22 Add whitelist mode (#11291) 2019-07-30 11:10:46 +02:00
mayaeh
7d13da568e Add tootctl preview_cards remove (#11320)
* Add `tootctl preview_cards remove`

* fix code style

* Remove `Scheduler::PreviewCardsCleanupScheduler` file

* fix code style again
Add exclude case where image_file_name is blank

* Added a function to output confirmation if the specified number of days is less than 2 weeks
2019-07-28 13:48:19 +02:00
Clar Fon
ea0b3589ff Remove pre from version, add extra suffix variable (#11407) 2019-07-26 07:57:27 +02:00
Eugen Rochko
1c612f24e4 Add categories for custom emojis (#11196)
Fix #7940
2019-06-28 15:54:10 +02:00
Eugen Rochko
2080807d5f Bump version to 2.9.2 (#11152) 2019-06-22 17:28:26 +02:00
Eugen Rochko
9ab22716a1 Bump version to 2.9.1 (#11143) 2019-06-22 01:51:27 +02:00
Eugen Rochko
500276ce96 Bump version to 2.9.0 (#11074) 2019-06-13 20:19:21 +02:00
Eugen Rochko
a388bc818b Bump version to 2.9.0rc2 (#11070) 2019-06-13 00:43:59 +02:00
Eugen Rochko
13f112c116 Bump version to 2.9.0rc1 (#11004) 2019-06-09 15:53:08 +02:00
Darius Kazemi
66ec27e0c8 Specify gzip required in tootctl emoji help (#11000) 2019-06-08 12:43:11 -04:00
Eugen Rochko
48abfb938f Forward port version bumps to 2.8.3 and 2.8.4 (#10819)
* Bump version to 2.8.3

* Bump version to 2.8.4
2019-05-24 15:57:31 +02:00
ThibG
f1a3135809 Record account suspend/silence time and keep track of domain blocks (#10660)
* Record account suspend/silence time and keep track of domain blocks

* Also unblock users who were suspended/silenced before dates were recorded

* Add tests

* Keep track of suspending date for users suspended through the CLI

* Show accurate number of accounts that would be affected by unsuspending an instance

* Change migration to set silenced_at and suspended_at

* Revert "Also unblock users who were suspended/silenced before dates were recorded"

This reverts commit a015c65d2d1e28c7b7cfab8b3f8cd5fb48b8b71c.

* Switch from using suspended and silenced to suspended_at and silenced_at

* Add post-deployment migration script to remove `suspended` and `silenced` columns

* Use Account#silence! and Account#suspend! instead of updating the underlying property

* Add silenced_at and suspended_at migration to post-migration

* Change account fabricator to translate suspended and silenced attributes

* Minor fixes

* Make unblocking domains always retroactive
2019-05-14 19:05:02 +02:00
Jeong Arm
8d4c489681 Remove custom emojis on "tootctl domains purge" (#10721)
* Remove custom emojis on domains purge

* Change message "Removing" to "Removed"
2019-05-09 22:03:20 +02:00
Eugen Rochko
0979e7f2f5 Bump version to 2.8.2 (#10703) 2019-05-05 17:14:15 +02:00
Ushitora Anqou
3feece700b Add SOURCE_TAG to show source repository's tag (#10698) 2019-05-04 17:39:17 +02:00
Eugen Rochko
a33bd6ad98 Add tootctl cache clear (#10689) 2019-05-04 01:02:57 +02:00
Eugen Rochko
52eca0c4b5 Bump version to 2.8.1 (#10687) 2019-05-04 00:31:06 +02:00
Eugen Rochko
cc9851a479 Fix accounts created through tootctl not being always pre-approved (#10684)
Add `--approve` option to `tootctl accounts modify`
2019-05-03 20:49:27 +02:00
Sho Kusano
1af37e09f3 Configrationable repository url (#10600)
* config: Add GITHUB_REPOSITORY for repository name

* config: Add SOURCE_BASE_URL for repository url

* Show source_url and repository name on getting started
2019-04-21 04:41:34 +02:00
Eugen Rochko
373fa21cf7 Bump version to 2.8.0 (#10550) 2019-04-10 23:32:08 +02:00
Eugen Rochko
01dc793a94 Bump version to 2.8.0rc3 (#10535) 2019-04-10 04:25:09 +02:00
Eugen Rochko
ae6c9b4f10 Bump version to 2.8.0rc2 (#10501) 2019-04-09 05:04:11 +02:00
Takeshi Umeda
01f46add16 Add tootctl accounts reset-relationships (#10483)
* Add `tootctl accounts reset`

* Rename reset to reset-relationships

* Improve command description
2019-04-08 07:46:55 +02:00
Eugen Rochko
07c6a0edc2 Fix missing long description on tootctl statuses remove (#10482) 2019-04-06 04:47:26 +02:00
Eugen Rochko
c455cba4d8 Add tootctl emoji purge (#10481)
Fix #10441
2019-04-06 04:47:16 +02:00
Eugen Rochko
a9c29f6e15 Add tootctl accounts approve (#10480) 2019-04-06 04:47:05 +02:00
Ben Lubar
e9ef322e14 Fix tootctl accounts cull (#10460)
* List the actual accounts that would have been culled during a dry run.

Otherwise, the dry run mode is basically useless.

* Prevent unreachable domains from inheriting the previous status code.

* Update CHANGELOG.md for #10460.
2019-04-04 16:46:27 +02:00
Jeong Arm
dbabfec2ea Simplify culling and fix race condition (#10440) 2019-04-01 19:17:21 +02:00
Eugen Rochko
2dc1f643d9 Bump version to 2.8.0rc1 (#10340)
Update AUTHORS.md
Update CHANGELOG.md
2019-03-30 02:13:42 +01:00
Eugen Rochko
b6bf8e24be Add tootctl search deploy to avoid ugly rake task syntax (#10403) 2019-03-28 02:16:11 +01:00
Eugen Rochko
73fb7bfa0f Admission-based registrations mode (#10250)
Fix #6856
Fix #6951
2019-03-14 05:28:30 +01:00
Eugen Rochko
e7bc85a91a Add tootctl statuses remove to sweep unreferenced statuses (#10063)
Query by @tateisu

Fix #1554
2019-03-11 13:45:17 +01:00
Eugen Rochko
657436c5db Bump version to 2.7.4 (#10179) 2019-03-05 18:22:46 +01:00
Eugen Rochko
c87532494d Bump version to 2.7.3 (#10102) 2019-02-23 22:20:20 +01:00
Eugen Rochko
db31bef536 Bump version to 2.7.2 (#10067) 2019-02-17 20:24:12 +01:00
Eugen Rochko
0848f9b66c Bump version to 2.7.1 (#9932) 2019-01-28 04:24:12 +01:00
Stanislas
92801eba9e Fix SUPERUSER postgres command (#9877) 2019-01-27 23:56:07 +01:00
Eugen Rochko
a338ea38bd Fix tootctl accounts delete not deleting user record as well (#9874) 2019-01-20 12:30:25 +01:00
Eugen Rochko
b4fece9327 Bump version to 2.7.0 2019-01-20 00:30:53 +01:00
Eugen Rochko
747bfbe950 Bump to 2.7.0rc3 2019-01-19 00:01:27 +01:00
Eugen Rochko
2c118c9229 Bump version to 2.7.0rc2 (#9836) 2019-01-18 22:55:01 +01:00
Eugen Rochko
7a4958b028 Fix tootctl domains crawl with JSON format output crash (#9820)
Fix #9817
2019-01-16 15:47:55 +01:00
Eugen Rochko
1c1ca9d155 Add tootctl domains crawl (#9809) 2019-01-15 09:24:35 +01:00
Eugen Rochko
0963a4400b Bump version to 2.7.0rc1 (#9718) 2019-01-08 14:10:54 +01:00
Eugen Rochko
611a9ff3fe Add tootctl accounts follow ACCT (#9414)
Fix #9369
2019-01-01 16:24:26 +01:00
Eugen Rochko
bbf9f4f93b Add REST API for creating an account (#9572)
* Add REST API for creating an account

The method is available to apps with a token obtained via the client
credentials grant. It creates a user and account records, as well as
an access token for the app that initiated the request. The user is
unconfirmed, and an e-mail is sent as usual.

The method returns the access token, which the app should save for
later. The REST API is not available to users with unconfirmed
accounts, so the app must be smart to wait for the user to click a
link in their e-mail inbox.

The method is rate-limited by IP to 5 requests per 30 minutes.

* Redirect users back to app from confirmation if they were created with an app

* Add tests

* Return 403 on the method if registrations are not open

* Require agreement param to be true in the API when creating an account
2018-12-24 19:12:38 +01:00
Eugen Rochko
652595d802 Fix tootctl accounts rotate not updating public keys (#9556)
This allowed you to brick your system when running that command, because the accounts would continue to advertise the old public key, but sign things with the new one
2018-12-18 01:22:29 +01:00
Eugen Rochko
626a544d08 Improve account suspension speed and completeness (#9290)
- Some associations were missing from the clean-up
- Some attributes were not reset on suspension
- Skip federation and streaming deletes when purging a dead domain
- Move account association definitions to concern
2018-12-03 01:32:08 +01:00
Eugen Rochko
9b85750348 Bump version to 2.6.5 (#9413) 2018-12-02 17:41:38 +01:00
Eugen Rochko
ecc22893f6 Bump version to 2.6.4 (#9402) 2018-11-30 21:38:09 +01:00
Eugen Rochko
ab3f2aba04 Bump version to 2.6.3 (#9391) 2018-11-30 14:20:15 +01:00
Eugen Rochko
163c5e6893 Bump version to 2.6.2 (#9370) 2018-11-27 13:56:47 +01:00
Renato "Lond" Cerqueira
55aa92b893 Touch account on successful response, change char shown when culled (#9293)
Just the color is not enough change since not everyone uses colored
terminals.
Touching the account makes it so that the account is not in the
threshold window in case of running again
2018-11-20 22:25:32 +01:00
mayaeh
214aab8715 Fix "tootctl media remove" can't count the file size (#9288)
* Fixed an issue where "tootctl media remove" can not count the file size.

* Fixed the problem pointed out by codeclimate.
2018-11-16 09:47:40 +01:00
Eugen Rochko
eed84cacba Fix nil error regression from #9229 in tootctl media remove (#9239)
Fix #9237
2018-11-08 21:55:59 +01:00
Eugen Rochko
a178e66988 Display amount of freed disk space in tootctl media remove (#9229)
* Display amount of freed disk space in tootctl media remove

Fix #9213

* Fix code style issue
2018-11-08 21:06:26 +01:00
Eugen Rochko
56e256b686 Bump version to 2.6.1 (#9172) 2018-10-31 01:04:45 +01:00
Eugen Rochko
15fd0fb2cf Bump version to 2.6.0 (#9149)
* Bump version to 2.6.0

* Update CHANGELOG.md
2018-10-30 22:06:59 +01:00
Eugen Rochko
4c8ac98fa0 Bump version to 2.6.0rc4 (#9164)
* Bump version to 2.6.0rc4

* Update CHANGELOG.md
2018-10-30 17:37:49 +01:00
Eugen Rochko
e6c91483fb Bump version to 2.6.0rc3 (#9142)
* Bump version to 2.6.0rc3

* Update CHANGELOG.md
2018-10-29 14:15:54 +01:00
Eugen Rochko
f435af86e7 Do not remove "dead" domains in tootctl accounts cull (#9108)
Leave `tootctl accounts cull` to simply check removed accounts from
live domains, and skip temporarily unavailable domains, while listing
them in the final output for further action.

Add `tootctl domains purge DOMAIN` to be able to purge a domain from
that list manually
2018-10-27 22:56:16 +02:00
Sascha
94b16add64 cli: set exit_on_failure for all CLI classes (#9094) 2018-10-25 16:05:33 +02:00
Eugen Rochko
9035c156c2 Bump version to 2.6.0rc2 (#9087)
* Bump version to 2.6.0rc2

* Update CHANGELOG.md
2018-10-25 04:42:25 +02:00
Eugen Rochko
7f1b063420 Fix cull tripping on nil in last_webfingered_at (#9051)
Fix #8741
2018-10-22 16:58:08 +02:00
Jeong Arm
e1a7e7b9cc Fix tootctl cull on dead servers (#9041)
* Delete first 9 accounts on dead servers

* Clean up code by moving dead server culling to the end
2018-10-21 22:52:27 +02:00
Jeong Arm
2f0318d360 Handle if username is not found on tootctl feeds build (#9040) 2018-10-21 16:42:22 +02:00
Eugen Rochko
bb62322411 Bump version to 2.6.0rc1 (#9025)
* Bump version to 2.6.0rc1

* Update AUTHORS.md

* Update CHANGELOG.md
2018-10-21 00:49:36 +02:00
Eugen Rochko
6cd4eaaee7 Bump version to 2.5.2 (#8960) 2018-10-12 00:24:09 +02:00
Eugen Rochko
a441df3e19 Bump version to 2.5.1 (#8953) 2018-10-11 02:29:32 +02:00
ashleyhull-versent
00d31a292c rubocop issues - Cleaning up (#8912)
* cleanup pass

* undo mistakes

* fixed.

* revert
2018-10-08 04:50:11 +02:00
Eugen Rochko
1a1160ee24 Add tootctl settings registrations open (#8829) 2018-10-04 16:05:54 +02:00
Eugen Rochko
20beab56e4 Fix tootctl accounts reattaching not unsuspending deleted account (#8812) 2018-09-29 18:40:40 +09:00
Eugen Rochko
6dd97b97be Add tootctl accounts backup (#8811) 2018-09-28 03:34:24 +02:00
Eugen Rochko
26d73847cb Move more tasks to tootctl (#8675)
* Move more tasks to tootctl

- tootctl feeds build
- tootctl feeds clear
- tootctl accounts refresh

Clean up exit codes and help messages

* Move user modifying to tootctl

* Improve user modification through CLI, rename commands

add -> create
mod -> modify
del -> delete

To remove ambiguity

* Fix code style issues

* Fix not being able to unset admin/mod role
2018-09-14 17:42:22 +02:00
luzpaz
1bce70d3c7 Misc. typos (#8694)
Found via `codespell -q 3 --skip="./app/javascript/mastodon/locales,./config/locales"`
2018-09-14 00:53:09 +02:00
Eugen Rochko
2aee3c9f23 tootctl accounts [add|del|cull] (#8642)
* CLI interface for creating/deleting local users

- tootctl accounts add USERNAME
- tootctl accounts del USERNAME

* Add CLI interface for culling remote users that no longer exist

- tootctl accounts cull
2018-09-09 13:33:36 +02:00
Eugen Rochko
e3fdf02943 Bump version to 2.5.0 2018-09-02 22:32:27 +02:00
Eugen Rochko
894e01163b Bump version to 2.5.0rc2 2018-09-01 03:37:43 +02:00
mayaeh
6823e24a9d Add --verbose and --dry-run option to tootctl media remove (#8519)
* Add --verbose and --dry-run options to CLI interface for removing remote media.

* Fix coding style problem.
2018-08-31 03:46:13 +02:00
mayaeh
2adac68cc7 Fix CLI interface for removing remote media (#8506)
* Fix that can't delete media files even if "tootctl media remove" execute when "--background" not attached.

* Revert

This reverts commit 5aa7e09645b27bae38a26030148b23e553ee2662.

* Change to obtain and pass all columns when "--background" option is false.
2018-08-29 18:35:09 +02:00
Eugen Rochko
1d319c531e Add CLI task for rotating keys (#8466)
* If an Update is signed with known key, skip re-following procedure

Because it means the remote actor did *not* lose their database

* Add CLI method for rotating keys

    bin/tootctl accounts rotate [USERNAME]

Generates a new RSA key per account and sends out an Update activity
signed with the old key.

* Key rotation: Space out Update fan-outs every 5 minutes per 1000 accounts

* Skip suspended accounts in key rotation
2018-08-26 20:21:03 +02:00
Eugen Rochko
7271a40d09 Add CLI interface for importing custom emoji (#8437)
bin/tootctl emoji import PATH_TO_TAR

Fix #8435
2018-08-26 16:53:06 +02:00
Eugen Rochko
e6e845f74d Add improved CLI interface for removing remote media (#8411)
./bin/tootctl media remove --days 7 --background

Make the old rake task point to it
2018-08-25 13:25:39 +02:00
Eugen Rochko
fc45d4a096 Bump version to 2.5.0rc1 (#8356) 2018-08-23 23:30:57 +02:00
Eugen Rochko
13df3889f0 Redesign public profiles and toots (#8068) 2018-07-28 19:25:33 +02:00
Eugen Rochko
54a78d1837 Bump version to 2.4.3 2018-07-11 11:21:27 +02:00
Eugen Rochko
ea88974c04 Bump version to 2.4.3rc3 2018-07-11 01:31:23 +02:00
Eugen Rochko
52fd091fe7 Bump version to 2.4.3rc2 2018-07-07 22:23:52 +02:00
Eugen Rochko
47fd3f260c Bump version to 2.4.3rc1 2018-07-05 21:08:03 +02:00
Eugen Rochko
5db8a0ba36 Bump version to 2.4.2 2018-06-19 01:45:00 +02:00
Eugen Rochko
d2a1e2e850 Bump version to 2.4.2rc3 2018-06-19 00:19:54 +02:00
Eugen Rochko
8b2ab128a2 Bump version to 2.4.2rc2 2018-06-18 23:01:52 +02:00
Eugen Rochko
5bcb18127c Bump version to 2.4.2rc1 2018-06-15 20:38:41 +02:00
Eugen Rochko
daf9bf9f12 Bump version to 2.4.1 2018-06-10 17:20:56 +02:00
Eugen Rochko
e23ccfa059 Bump version to 2.4.1rc4 2018-06-10 00:39:56 +02:00
Eugen Rochko
e28866b313 Bump version to 2.4.1rc3 2018-06-06 21:27:06 +02:00
Eugen Rochko
36528f28a5 Bump version to 2.4.1rc2 2018-06-05 11:53:30 +00:00
Eugen Rochko
eebe7fb2d5 Bump version to 2.4.1rc1 2018-05-30 19:16:41 +02:00