KMY
d021659cb7
Merge remote-tracking branch 'parent/main' into upstream-20241009
2024-10-09 12:32:11 +09:00
Matt Jankowski
258dce1256
Add OpenSSL::SSL::SSLError
to http connection errors wrapper ( #32307 )
2024-10-08 14:59:51 +00:00
Matt Jankowski
e8ec6667bd
Extract wrapper constant for HTTP::*
error classes ( #32285 )
2024-10-08 13:53:35 +00:00
KMY
fc9d27ff91
Merge remote-tracking branch 'parent/main' into upstream-20240913
2024-09-13 10:31:48 +09:00
Eugen Rochko
e0c27a5047
Add ability to manage which websites can credit you in link previews ( #31819 )
2024-09-10 12:00:40 +00:00
Mike Dalessio
a0ea2fa3b0
Change fetch link card service to parse as HTML5 ( #31814 )
2024-09-09 10:59:42 +00:00
KMY
8e5fe5ccb9
Merge remote-tracking branch 'parent/main' into upstream-20240806
2024-08-06 08:16:16 +09:00
Christian Schmidt
4853a2bada
Add Accept-Language header when fetching preview card ( #31232 )
2024-08-01 09:14:24 +00:00
KMY
adee1645a3
Merge remote-tracking branch 'parent/main' into upstream-20240716
2024-07-16 09:01:12 +09:00
David Roetzel
967505ee9b
Add size limit for all PreviewCard URLs ( #30973 )
2024-07-09 13:11:34 +00:00
David Roetzel
016c1e4e78
Improve handling of encoding problems when creating link previews ( #30929 )
2024-07-05 11:54:38 +00:00
KMY
6955843321
Merge remote-tracking branch 'parent/main' into upstream-20240628
2024-06-28 08:57:12 +09:00
David Roetzel
ff08d99d4d
Catch encoding errors when creating link previews. ( #30853 )
2024-06-27 14:41:03 +00:00
David Roetzel
42adb6eaee
Add size limit for link preview URLs ( #30854 )
2024-06-27 14:40:19 +00:00
KMY
13ad383039
Merge remote-tracking branch 'parent/main' into upstream-20240531
2024-05-31 08:27:09 +09:00
Eugen Rochko
128987eded
Add support for fediverse:creator
OpenGraph tag ( #30398 )
2024-05-29 01:34:33 +02:00
KMY
c546939a40
Merge remote-tracking branch 'parent/main' into upstream-20240524
2024-05-24 08:33:49 +09:00
Joshua Byrd
6282b6da77
Fix og:image requests when html in a web page is over 1.megabyte ( #30362 )
2024-05-19 16:30:05 +00:00
KMY(雪あすか)
d89e1114bb
Add: #667 プレビューカード、参照のフェッチを行わないドメインの設定 ( #690 )
2024-04-03 12:37:18 +09:00
KMY(雪あすか)
46161e5348
Fix: 投稿ではないリンクを参照したときにリンクプレビューが生成されない問題 ( #482 )
2024-01-18 13:09:20 +09:00
KMY(雪あすか)
aefe147c2b
Remove: #454 リンクプレビューを生成する設定の削除、無効化 ( #458 )
2024-01-15 12:27:20 +09:00
KMY
0704829a9b
Merge remote-tracking branch 'parent/main' into upstream-20231116
2023-11-14 09:14:19 +09:00
Eugen Rochko
0d14fcebae
Change link previews to keep original URL from the status ( #27312 )
2023-11-13 09:58:28 +00:00
KMY
bd87415996
Add link_preview setting
2023-09-03 10:27:24 +09:00
KMY
ad7952ce3d
Improve fetch_link_card_service to exclude status references url
2023-08-27 09:15:19 +09:00
Claire
6b896b20cc
Add primary key to preview_cards_statuses join table (includes deduplication migration) ( #25243 )
2023-08-03 11:12:52 +02:00
Christian Schmidt
f96e4b3047
Use original URL in preview if it redirects to 4xx page ( #26200 )
2023-07-28 23:02:08 +02:00
Nick Schonning
c66250abf1
Autofix Rubocop Regex Style rules ( #23690 )
...
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
2023-06-06 14:50:51 +02:00
Matt Jankowski
f1c1dd0118
Rename with_lock
to with_redis_lock
to avoid confusion with ActiveRecord's method ( #24741 )
2023-05-02 18:16:07 +02:00
Nick Schonning
0cfdd1a401
Enable Rubocop Style/StringConcatenation defaults ( #23792 )
2023-02-22 09:54:36 +09:00
Nick Schonning
2177daeae9
Autofix Rubocop Style/RedundantBegin ( #23703 )
2023-02-19 07:09:40 +09:00
Nick Schonning
ed570050c6
Autofix Rails/EagerEvaluationLogMessage ( #23429 )
...
* Autofix Rails/EagerEvaluationLogMessage
* Update spec for debug block syntax
2023-02-07 03:44:36 +01:00
Eugen Rochko
6cf57c6765
Refactor how Redis locks are created ( #18400 )
...
* Refactor how Redis locks are created
* Fix autorelease duration on account deletion lock
2022-05-13 00:02:35 +02:00
Eugen Rochko
3917353645
Fix single Redis connection being used across all threads ( #18135 )
...
* Fix single Redis connection being used across all Sidekiq threads
* Fix tests
2022-04-28 17:47:34 +02:00
Eugen Rochko
cefa526c6d
Refactor formatter ( #17828 )
...
* Refactor formatter
* Move custom emoji pre-rendering logic to view helpers
* Move more methods out of Formatter
* Fix code style issues
* Remove Formatter
* Add inline poll options to RSS feeds
* Remove unused helper method
* Fix code style issues
* Various fixes and improvements
* Fix test
2022-03-26 02:53:34 +01:00
luzpaz
73f5e4a1d9
Fix various typos ( #17621 )
...
Found via `codespell -q 3 -S ./CHANGELOG.md,./AUTHORS.md,./config/locales,./app/javascript/mastodon/locales -L ba,keypair,medias,ro`
2022-02-22 20:14:17 +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
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
9a19227f17
Fix some RedisLocks auto-releasing too fast ( #16276 )
...
* Fix Delete and Create-related locks expiring too fast
Fixes #16238
By default, RedisLock expires after 10 seconds, which may not be enough to
process statuses, especially when those have attached media files.
This commit extends those 10 seconds to 15 minutes, which should be plenty
enough to handle any status, while being short enough to not waste many
sidekiq job retries in the exceedingly rare case in which a sidekiq process
would crash when processing a `Create` or `Delete`.
* Fix other RedisLock autorelease durations
Fixes #15645
- things that only perform a few simple database queries (e.g. finding and
saving a record) have been left unchanged, so they'll still use the default
10s duration
- things that perform significantly more complex database queries have been
changed to a 5 minutes timeout
- things that perform multiple HTTP queries have been changed to a 15 minutes
timeout
2021-05-19 23:52:08 +02:00
Claire
5614e6724e
Fix URL scanning in note length validator and preview card fetching ( #15827 )
...
* Add tests
* Fix URL scanning in note length validator and preview card fetching
2021-03-04 00:12:26 +01:00
Claire
65db262550
Update twitter-text from 1.14 to 3.1.0 and fix toot character counting ( #15382 )
...
* Update twitter-text from 1.14 to 3.1.0
* Disable emoji parsing
* Properly depend on twitter-text for url detection
* Fix some URLs being wrongly detected client-side
* Add test for server-side validation of non-autolinkable URLs
* Fix server-side status length counting
2021-03-02 12:02:56 +01:00
Takeshi Umeda
7f1c56954b
Fix first return value of FetchLinkCardService.html method ( #15630 )
2021-01-25 09:22:41 +01:00
luigi
087ed84367
Optimize map { ... }.compact calls ( #15513 )
...
* Optimize map { ... }.compact
using Enumerable#filter_map, supported since Ruby 2.7
* Add poyfill for Enumerable#filter_map
2021-01-10 00:32:01 +01:00
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>
2020-09-01 03:04:00 +02:00
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
2020-07-07 10:55:18 +02:00
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
2019-12-18 16:56:06 +01:00
ThibG
c656cc2191
Fix FetchLinkCardServices crashing on a tags without a target ( #12159 )
...
* Add test for links without targets
* Fix FetchLinkCardServices crashing on a tags without a target
2019-11-21 16:04:52 +01:00
Eugen Rochko
d14e74eff5
Add cache for OEmbed endpoints to avoid extra HTTP requests ( #12403 )
...
* add youtube oembed endpoint
* add check for oembed endpoint
* change unless for a more readable if
* clear blank lines
* endpoint via https
* Fix string literal in condition
* use cache for endpoints
* use cache for endpoints
* clean up and adding check
* clean up and remove redundant return
* add html check
* add false to return
* use double quotes
* use double quotes
* Clean up
2019-11-17 18:40:33 +01:00
nightpool
9762fe382c
microformat mentions can have an implicit property ( #12189 )
...
See the first example here: http://microformats.org/wiki/microformats2#hyperlinked_person
2019-10-24 22:46:15 +02:00
Eugen Rochko
9ba40a6bfd
Remove HEAD request from fetching link previews ( #12028 )
...
It is not really necessary and we need to reduce requests
2019-10-01 04:54:10 +02:00