Commit Graph

785 Commits (e6b272e5c9c227cfbbe375a893f567c5967d669c)

Author SHA1 Message Date
Eugen Rochko 65760f59df
Refactor feed manager (#14761) 4 years ago
Eugen Rochko e8bc187845
Refactor how public and tag timelines are queried (#14728) 4 years ago
Eugen Rochko 1c308af84c
Change own direct-visibility statuses to be in the home feed again (#14711)
And remove highlighting in web UI

Full circle from #8940
4 years ago
dependabot[bot] 8972e5f7f6
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>
4 years ago
Takeshi Umeda b1bb1906be
Fix limited follower id in fan-out-on-write service (#14709) 4 years ago
Eugen Rochko ce8f33dd2f
Fix inefficiencies in fan-out-on-write service (#14682) 4 years ago
Akihiko Odaki 41eeb9ebaa
Use Status.group instead of Status.distinct in HashQueryService (#14662)
DISTINCT clause removes duplicated records according to all the selected
attributes. In reality, it can remove duplicated records only looking at
statuses.id, but the clause confuses the query planner and yields
insufficient performance.
The behavior is also problematic if the scope produced by HashQueryService
is used to query columns without id (using pluck method, for example). The
scope is expected to contain unique statuses, but the uniquness will be
evaluated with some arbitrary columns other than id.

GROUP BY clause resolves those problem by explicitly specifying the
column to take into account for the record distinction.

A workaround for the problem of DISTINCT clause in
Api::V1::Timelines::TagController is no longer necessary and removed.
4 years ago
Takeshi Umeda 156af70e4d
Fix following restriction not working when exact match in account search (#14394) 4 years ago
Takeshi Umeda 939a47393c
Fix duplicate notification and delivery of mentions (#14378) 5 years ago
Takeshi Umeda 7540e235a2
Fix movie width and frame_rate returning nil (#14357)
* Fix movie width and frame_rate returning nil

* Add StreamValidationError and raise

* Fix code style
5 years ago
ThibG d658af7ff8
Fix removing allowed domains being done synchronously (#14302)
* Fix removing allowed domains being done synchronously

* Add tests
5 years ago
Eugen Rochko 98b3b80d6b
Fix account domain block not properly unfollowing accounts from domain (#14304)
Fix #14303
5 years ago
ThibG ee5a4030f7
Fix removing a DomainAllow rule wiping known accounts in open federation mode (#14298)
Fixes #14296
5 years ago
Eugen Rochko ed04697510
Change User-Agent of link preview fetching service to include "Bot" (#14248)
This forces Twitter to render OpenGraph tags in the response
5 years ago
Eugen Rochko 64aac30733
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
5 years ago
ThibG 89f40b6c3e
Make domain block/silence/reject-media code more robust (#13424)
* Split media cleanup from reject-media domain blocks to its own service

* Slightly improve ClearDomainMediaService error handling

* Lower DomainClearMediaWorker to lowest-priority queue

* Do not catch ActiveRecord::RecordNotFound in domain block workers

* Fix DomainBlockWorker spec labels

* Add some specs

* Change domain blocks to immediately mark accounts as suspended

Rather than doing so sequentially, account after account, while cleaning
their data. This doesn't change much about the time the block takes to
complete, but it immediately prevents interaction with the blocked domain,
while up to now, it would only be guaranteed when the process ends.
5 years ago
Takeshi Umeda d890abfcab
Fix performance of follow import (#13836) 5 years ago
Takeshi Umeda 643065799b
Fix activity not being signed (#13948) 5 years ago
Eugen Rochko 5d8398c8b8
Add E2EE API (#13820) 5 years ago
ThibG 27ea7c13a5
Fix hashtag search performing account search as well (#13758) 5 years ago
Takeshi Umeda d8bad8fbf6
Fix not publishing update of remote timeline (#13745)
* Fix not publishing update of remote timeline

* fix @ missing

* if/unless to if/else
5 years ago
Eugen Rochko 4b766f9846
Refactor monkey-patching of Goldfinger (#12561) 5 years ago
Eugen Rochko 2744f61696
Fix not being able to resolve public resources in development environment (#13505) 5 years ago
Eugen Rochko c3965e28b3
Fix returning results when searching for URL with non-zero offset (#13377)
Fix #13083
5 years ago
Takeshi Umeda 11169367e4
Fix incorrect deletion of local accounts imported by overwriting (#13350) 5 years ago
ThibG f08f880f58
Fix media not being marked sensitive when client sets a CW but no text (#13277)
Mastodon enforces the “sensitive” flag on media attachments whenever a toot
is posted with a Content Warning. However, it does so *after* potentially
converting the Content Warning to toot text (when there is no toot text),
which leads to inconsistent and surprising behavior for API clients.
This commit fixes this inconsistency.
5 years ago
ThibG cb12a2cdd3
Fix some timeouts when searching URLs by limiting some database queries (#13253)
Only look up private toots from database if the request failed because of 401,
403 or 404 errors, as those may indicate a private toot, rather than something
that isn't a toot or cannot be processed.
5 years ago
ThibG b154428e14
Add federation support for the "hide network" preference (#11673)
* Change ActivityPub follower/following collections to not link first page

* Add support for hiding followers and following of remote users

* Switch to using a single `hide_collections` column

* Address code style remarks
5 years ago
Eugen Rochko 9660aa4543
Change local media attachments to perform heavy processing asynchronously (#13210)
Fix #9106
5 years ago
ThibG 5284e29e2f
Fix public posts from silenced accounts not being changed to unlisted visibility (#13096) 5 years ago
ThibG 6185bff4b3
Fix error when searching for URLs that contain the mention syntax (#13151)
Fixes #13150
5 years ago
Eugen Rochko 339ce1c4e9
Add specific rate limits for posting and following (#13172) 5 years ago
ThibG cf4fe6caef
Fix misleading error when attempting to re-send a pending follow request (#13133)
Fixes #13131
5 years ago
ThibG d91946ae13
Fix backups failing when files are missing from media attachments (#13146)
Fixes #13123
5 years ago
ThibG 3704402dcc
Fix duplicate accounts being created when fetching an account for its key only (#13147)
Fixes #13136

When a user's canonical acct domain is different from its id's domain
(WEB_DOMAIN ≠ LOCAL_DOMAIN), two webfinger queries are required to find the
canonical domain from the URI. However, we skip webfinger queries when
updating only the key of a remote user, which led to the creation of a
duplicate account, using the URI's domain instead of the canonical acct: one.
5 years ago
ThibG 983ab40086
Fix previously OStatus-based accounts not being detected as ActivityPub (#13129) 5 years ago
ThibG d386d89179 Fix invalid votes from the API being accepted (#12601)
* Fix invalid votes from the API being accepted

Fixes #12556

- Ensure `choice` is an integer instead of silently converting to 0
- Ensure `choice` corresponds to an actual choice of the poll

* Please CodeClimate
5 years ago
Daigo 3 Dango 206dfd7dad Clarify keyword arguments with ** (#12769)
This change is to suppress the warning below on on ruby-2.7.0:

- warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call

https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/
5 years ago
ThibG c306978190 Use quality values in Accept field to explicitly prefer JSON over HTML (#12806) 5 years ago
ThibG e4d75f238b Fix URL search not returning private toots user has access to (#12742) 5 years ago
Eugen Rochko f86ee4b59f
Fix IDN mentions not being processed, IDN domains not being rendered (#12715)
This changes the REST API to return unicode domains in the `acct`
attribute instead of punycode, and to render unicode instead of
punycode on public HTML pages as well.

Fix #7812, fix #12246
5 years ago
chr v1.x 7e074610a6 Fix backups stopping due to read timeouts (#12281)
* Make BackupService resilient to read timeouts

If an attachment read times out, assume that the resources is
inaccessible and continue the backup without it. This fixes #12280.

* Both errors on one line
5 years ago
ThibG b364175e1b Fix link crawler not specifying accepted content-type (#12646)
The link crawler expects HTML documents, so set the `Accept`
header accordingly.

Fixes #12618
5 years ago
Takeshi Umeda 68070e82cc Add signature to exported status (#12649) 5 years ago
Takeshi Umeda a391eaf4d8 Fix an error when ActivityPub::FetchRemoteStatusService url is called with nil (#12652) 5 years ago
ThibG 2ee5a9d9c3 Clean up OStatus-related codepaths (#12173)
* Remove “protocol” argument and return value, as only ActivityPub is supported

* Remove FetchRemoteAccountService, only use ActivityPub::FetchRemoteAccountService

* Fix tests
5 years ago
Alice Gaudon 668f698077 Admin setting to disable default follows (#12566) 5 years ago
trwnh 1653ae91ce Fix account search with no query (#12549)
* Fix account search with no query

Modeled after #12541. Fix #12548

* fix codeclimate
5 years ago
Eugen Rochko bbf926b1c0
Fix error when using search API with no query (#12541)
Fix #12462
5 years ago
ThibG 911cc14481 Add follow_request notification type (#12198)
* Add follow_request notification type

The notification type already existed in the backend but was never pushed
to the front-end. This also means translation strings were also available
for the backend, from the notification mailer.

Unlike other notification types, these are off by default, to match what
I remember of Gargron's view on the topic: that follow requests should not
clutter notifications and should instead be reviewed at the user's own
leisure in the dedicated column.

Since follow requests have their own column, I've deemed it unnecessary to
add a specific tab for them in the notification quick filter.

* Show follow request link in single-column if there are pending requests, even if account isn't locked

* Push follow requests from notifications to the follow_requests list

* Offer to accept or reject follow request from the notification

* Redesign follow request notification
5 years ago