about summary refs log tree commit diff
path: root/spec/lib
AgeCommit message (Collapse)Author
2020-08-04Add tests for direct message assertionsFire Demon
2020-08-02Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
2020-08-02Change content-type to be always computed from file data (#14452)ThibG
* Change content-type to be always computed from file data Restore previous behavior, detecting the content-type isn't very expensive, and some instances may serve files as application/octet-stream regardless of their true type, making fetching media from them fail, while it used to work pre-3.2.0. * Add test
2020-08-01Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
Conflicts: - `yarn.lock`: No real conflict, just a glitch-soc-only dependency textually too close to one updated upstream. Ported upstream changes.
2020-08-01Fix handling of Reject Follow when a matching follow relationship exists ↵ThibG
(#14479) * Add tests * Fix handling of Reject Follow when a matching follow relationship exists Regression from #12199
2020-07-22Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
Conflicts: - `app/javascript/mastodon/actions/compose.js`: Not a “real” conflict, but change too close to a change we made to fix the vanilla WebUI locally pushing authored local-only toots in the public TL view.
2020-07-22Fix not handling Undo on some activity types when they aren't inlined (#14346)ThibG
* Fix not handling Undo on some activity types when they aren't inlined When receiving an Undo for a non-inlined activity, try looking it up in database using the URI. The queries are ad-hoc because we don't have a global index of object URIs, and not all activity types are stored in database with an index on their URI. Announces are just statuses, and have an index on URIs, so this check can be done efficiently. Accepts cannot be handled at all because we don't record their URI at any point. Follows don't have an index on URI, but they have an index on the issuing account, which should make such queries largely manageable. Likes don't have an index on URI, they have an index on the issuing account, but the number of favs per account may be very high, so I decided not to handle that. Blocks don't have an index on URI, but they have an index on the issuing account, which should make such queries largely manageable. In all cases, if an Undo could not be handled properly, we call `delete_later!` because that does not require us to know more than the URI of the undone property. * Add tests * Make newer blocks overwrite older ones Allows re-synchronizing block info by re-blocking and un-blocking again when the original Undo Block has been lost.
2020-07-17Fix boosted toots from blocked account not being retroactively removed from ↵ThibG
TL (#14339) * Fix boosted toots from blocked account not being retroactively removed from TL Fixes #14301 * Add test for clear_from_timeline
2020-07-01Add support for “start” and “reversed” attributes to ol elementThibaut Girka
Fixes #1367
2020-06-09Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
Conflicts: - `app/controllers/activitypub/collections_controller.rb`: Conflict due to glitch-soc having to take care of local-only pinned toots in that controller. Took upstream's changes and restored the local-only special handling. - `app/controllers/auth/sessions_controller.rb`: Minor conflicts due to the theming system, applied upstream changes, adapted the following two files for glitch-soc's theming system: - `app/controllers/concerns/sign_in_token_authentication_concern.rb` - `app/controllers/concerns/two_factor_authentication_concern.rb` - `app/services/backup_service.rb`: Minor conflict due to glitch-soc having to handle local-only toots specially. Applied upstream changes and restored the local-only special handling. - `app/views/admin/custom_emojis/index.html.haml`: Minor conflict due to the theming system. - `package.json`: Upstream dependency updated, too close to a glitch-soc-only dependency in the file. - `yarn.lock`: Upstream dependency updated, too close to a glitch-soc-only dependency in the file.
2020-06-02Add E2EE API (#13820)Eugen Rochko
2020-05-28Fix exception when trying to serialize posts with <a> tags in them without ↵Ben Lubar
hrefs (#1334) * fix exception when trying to serialize posts with <a> tags in them without hrefs * Add tests Co-authored-by: Thibaut Girka <thib@sitedethib.com>
2020-05-20Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
2020-05-15Add support for `summary` field for media description (#13763)ThibG
2020-05-14Fix webfinger returning wrong status code on malformed or missing param (#13759)ThibG
Fixes #13757
2020-05-10Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
Conflicts: - `Gemfile.lock`: Not a real conflict, just a glitch-soc-only dependency too close to a dependency that got updated upstream. Updated as well. - `app/models/status.rb`: Not a real conflict, just a change too close to glitch-soc-changed code for optionally showing boosts in public timelines. Applied upstream changes. - `app/views/layouts/application.html.haml`: Upstream a new, static CSS file, conflict due to glitch-soc's theming system, include the file regardless of the theme. - `config/initializers/content_security_policy.rb`: Upstream dropped 'unsafe-inline' from the 'style-src' directive, but both files are very different. Removed 'unsafe-inline' as well.
2020-05-10Improve RSS entries for statuses (#13592)ThibG
* Improve RSS entries for statuses - Render polls in both accounts and tags serializers - Refactor RSS serializers - Change title preview to include ellipsis when truncated - Change title preview to show CW instead of toot text - Add tests * Remove title from OEmbed serialization Twitter doesn't serialize title either, and tihs allows us to move the title formatting code to the RSS serializers.
2020-04-17Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
2020-04-15Change delivery failure tracking to work with hostnames instead of URLs (#13437)Eugen Rochko
2020-03-24Make sanitizer *not* add no-referrer etc. in local markdown toots if the ↵Thibaut Girka
link is “safe”
2020-03-24Fix glitch-soc marking every link in toots as a tagThibaut Girka
Fixes #1281
2020-02-09Fix testsThibaut Girka
Well, kinda, it's actually a bug from glitch-soc, but we will have to address it separately.
2020-02-09Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
Conflicts: - `Gemfile`: We updated httplog in a separate commit. Took upstream's change which updated it further. - `Gemfile.lock`: We updated httplog in a separate commit. Took upstream's change which updated it further. - `app/lib/sanitize_config.rb`: Upstream added better unsupported link stripping, while we had different sanitizing configs. Took only upstream's link stripping code. - `config/locales/simple_form.pl.yml`: Strings unused in glitch-soc had been removed from glitch-soc, reintroduced them even if they are not useful, to reduce the risk of later merge conflicts.
2020-02-08Fix rendering `<a>` without `href` when scheme unsupported (#13040)Eugen Rochko
- Disallow links with relative paths - Disallow iframes with non-http protocols and relative paths Close #13037
2020-01-24Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
Conflicts: - `app/controllers/statuses_controller.rb`: Minor conflict due to theming system
2020-01-23Add support for magnet: URIs (#12905)ThibG
2020-01-12Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
Conflicts: - `Gemfile.lock`: No real conflict, glitch-soc-only dependency (redcarpet) too close to an upstream one (rdf-normalize) - `README.md`: we have different READMEs, discarded upstream's changes - `app/views/admin/custom_emojis/index.html.haml`: No real conflict, different context because of glitch-soc theming - `lib/mastodon/statuses_cli.rb`: Upstream added code to keep bookmarked statuses, we were already doing so with slightly different code. Discarded upstream's changes. - `package.json`: No real conflict, glitch-soc-only dependency (favico.js) too close to an upstream one
2020-01-11Add support for linking XMPP URIs in toots (#12709)ThibG
* Fix wrong grouping in Twitter valid_url regex * Add support for xmpp URIs Fixes #9776 The difficult part is autolinking, because Twitter-text's extractor does some pretty ad-hoc stuff to find things that “look like” URLs, and XMPP URIs do not really match the assumptions of that lib, so it doesn't sound wise to try to shoehorn it into the existing regex. This is why I used a specific regex (very close, although slightly more permissive than the RFC), and a specific scan function (a simplified version of the generalized one from Twitter). * Remove leading “xmpp:” from auto-linked text
2019-12-19Merge branch 'master' into glitch-soc/masterThibaut Girka
Conflicts: - `config/locales/en.yml` No real conflict, upstream added a translatable string “too close” to one specific to glitch-soc - `lib/mastodon/statuses_cli.rb` Fixes made upstream, while changed in glitch-soc to keep bookmarked statuses - `package.json` No real conflict, additional dependency in glitch-soc
2019-12-17Fixes featured hashtag setting page erroring out instead of rejecting ↵ThibG
invalid tags (#12436) * Revert "Fix ignoring whole status because of one invalid hashtag (#11621)" This reverts commit dff46b260b2f7d765d254c84a4b89105c7de5e97. * Fix statuses being rejected because of invalid hashtag names * Add spec for invalid hashtag names in statuses * Add test for featured tags controller
2019-11-06Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
Conflicts: - `package.json`
2019-11-04Fix remote media descriptions being cut off at 420 chars (#12262)ThibG
* Fix remote media descriptions being cut off at 420 chars Fixes #12258 * Fix tests
2019-10-24Add noopener and/or noreferrer (#12202)BSKY
2019-10-10Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
Conflicts: - README.md - app/javascript/styles/mastodon/components.scss conflicts caused by image URLs being different - app/models/status.rb as_home_timeline removed, kept glitch-soc-only as_direct_timeline - app/views/statuses/_simple_status.html.haml - config/locales/en.yml some strings were changed upstream - spec/models/status_spec.rb as_home_timeline removed, kept glitch-soc-only as_direct_timeline
2019-10-09Remove auto-silence behaviour from spam check (#12117)Eugen Rochko
Fix #12113
2019-09-30Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
Conflicts: - Gemfile - Gemfile.lock - app/controllers/about_controller.rb - app/controllers/auth/sessions_controller.rb
2019-09-27Change silences to always require approval on follow (#11975)ThibG
* Change silenced accounts to require approval on follow * Also require approval for follows by people explicitly muted by target accounts * Do not auto-accept silenced or muted accounts when switching from locked to unlocked * Add `follow_requests_count` to verify_credentials * Show “Follow requests” menu item if needed even if account is locked * Add tests * Correctly reflect that follow requests weren't auto-accepted when local account is silenced * Accept follow requests from user-muted accounts to avoid leaking mutes
2019-09-18Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
Conflicts: - app/controllers/auth/sessions_controller.rb Minor conflict due to glitch-soc's theming code
2019-09-18Change spam check to apply to local accounts and add a threshold (#11806)Eugen Rochko
Instead of detecting spam on first duplicate message, add a threshold of 5 such messages to reduce false positives
2019-09-05Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
2019-09-03Fix ActivityPub context not being dynamically computed (#11746)ThibG
* Fix contexts not being dynamically included Fixes #11649 * Refactor Note context in serializer * Refactor Actor serializer
2019-08-05Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
2019-07-30Fix boosting & unboosting preventing a boost from appearing in the TL (#11405)ThibG
* Fix boosting & unboosting preventing a boost from appearing in the TL * Add tests * Avoids side effects when aggregate_reblogs isn't true
2019-07-28Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
2019-07-27Implement pending tests (#11415)ysksn
2019-07-23Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
Conflicts: - app/controllers/application_controller.rb - app/controllers/auth/confirmations_controller.rb - app/controllers/auth/sessions_controller.rb - app/controllers/settings/deletes_controller.rb - app/controllers/settings/two_factor_authentication/recovery_codes_controller.rb
2019-07-21Play animated custom emoji on hover (#11348)ThibG
* Play animated custom emoji on hover in status * Play animated custom emoji on hover in display names * Play animated custom emoji on hover in bios/bio fields * Add support for animation on hover on public pages emojis too * Fix tests * Code style cleanup
2019-07-19Fix sanitizer text case for glitch-soc, which preserves listsThibaut Girka
2019-07-19Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
Conflicts: - Gemfile.lock - app/controllers/accounts_controller.rb - app/controllers/admin/dashboard_controller.rb - app/controllers/follower_accounts_controller.rb - app/controllers/following_accounts_controller.rb - app/controllers/remote_follow_controller.rb - app/controllers/stream_entries_controller.rb - app/controllers/tags_controller.rb - app/javascript/packs/public.js - app/lib/sanitize_config.rb - app/models/account.rb - app/models/form/admin_settings.rb - app/models/media_attachment.rb - app/models/stream_entry.rb - app/models/user.rb - app/serializers/initial_state_serializer.rb - app/services/batched_remove_status_service.rb - app/services/post_status_service.rb - app/services/process_mentions_service.rb - app/services/reblog_service.rb - app/services/remove_status_service.rb - app/views/admin/settings/edit.html.haml - config/locales/simple_form.pl.yml - config/settings.yml - docker-compose.yml
2019-07-19Fix sanitizing lists contents (#11354)ThibG
* Add test * Fix code for sanitizing nested lists stripping all tags