diff --git a/database/migrations/2026_03_14_000000_expand_webmentions_source_target_to_text.php b/database/migrations/2026_03_14_000000_expand_webmentions_source_target_to_text.php new file mode 100644 index 00000000..de643ab0 --- /dev/null +++ b/database/migrations/2026_03_14_000000_expand_webmentions_source_target_to_text.php @@ -0,0 +1,26 @@ +text('source')->change(); + $table->text('target')->change(); + }); + } + + public function down(): void + { + Schema::table('webmentions', function (Blueprint $table) { + $table->string('source')->change(); + $table->string('target')->change(); + }); + } +}; diff --git a/database/schema/pgsql-schema.sql b/database/schema/pgsql-schema.sql index 6dae72e5..d1f926a3 100644 --- a/database/schema/pgsql-schema.sql +++ b/database/schema/pgsql-schema.sql @@ -723,8 +723,8 @@ ALTER SEQUENCE public.users_id_seq OWNED BY public.users.id; CREATE TABLE public.webmentions ( id integer NOT NULL, - source character varying(255) NOT NULL, - target character varying(255) NOT NULL, + source text NOT NULL, + target text NOT NULL, commentable_id integer, commentable_type character varying(255), type character varying(255), diff --git a/tests/Unit/Jobs/ProcessWebMentionJobTest.php b/tests/Unit/Jobs/ProcessWebMentionJobTest.php index e3754b86..549dee60 100644 --- a/tests/Unit/Jobs/ProcessWebMentionJobTest.php +++ b/tests/Unit/Jobs/ProcessWebMentionJobTest.php @@ -195,6 +195,38 @@ class ProcessWebMentionJobTest extends TestCase ]); } + #[Test] + public function webmention_with_long_source_url_gets_saved(): void + { + Queue::fake(); + + $parser = new Parser; + + $html = <<<'HTML' +