mirror of https://github.com/pixelfed/pixelfed
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
storeHashtags() keyed firstOrCreate on slug, so distinct tags that slugify to the same base (e.g. #foo·bar vs #foobar) collapsed into one row and tags reducing to an empty slug aggregated under slug=''. Mirror the StatusTagsPipeline pattern: skip empty slugs, derive a non-colliding slug via a counter loop, and key firstOrCreate on the unique name column. The DB::transaction wrapper, the mb_strlen > 124 skip, and the status_hashtags linking are unchanged. Verified in the ddev sqlite harness: - Against unfixed code the new test fails (2 failed, 1 passed): the two distinct tags collapse to one row and a slug='' row is created. - Against the fix it passes (3 passed, 10 assertions). - Sibling StatusTagsPipelineHashtagTest + StatusEntityLexerFanoutTest: 5 passed. - pint --test: PASS on both files. |
1 week ago | |
|---|---|---|
| .. | ||
| HashtagSlugCollisionTest.php | 1 week ago | |