Skip to content

Add resolver-backed SocialLinkReplacers for OnlyFans and Fansly - #162

Merged
dvir001 merged 1 commit into
mainfrom
copilot/add-sociallinkreplacers-onlyfans
Sep 28, 2026
Merged

dvir001 merged 1 commit into
mainfrom
copilot/add-sociallinkreplacers-onlyfans

Conversation

Copilot AI commented Sep 28, 2026

Copy link
Copy Markdown

This updates social link rewriting to support OnlyFans and a similar platform (Fansly) using the existing resolver-backed replacer model. The goal is to enable embed-friendly rewritten links for these domains without changing core rewrite logic.

  • Configuration updates

    • Added OnlyFans and Fansly replacer entries in .env.example.
    • Both map source hosts to the existing embedez resolver flow:
      • ResolverUrl: https://embedez.com/api/v1/providers/combined
      • ResolvedUrlTemplate: https://embedez.com/embed/{key}
  • Behavioral coverage

    • Extended SocialLinkRewriterTests with a focused case that validates:
      • resolver requests are issued for onlyfans.com and fansly.com links
      • resolved keys are emitted via the configured embed URL template
  • No production logic changes

    • SocialLinkRewriter implementation remains unchanged; this PR adds provider configuration + regression coverage for the new providers.
PluralKit__Bot__SocialLinkReplacers__OnlyFans__SourceHosts=onlyfans.com,*.onlyfans.com
PluralKit__Bot__SocialLinkReplacers__OnlyFans__ResolverUrl=https://embedez.com/api/v1/providers/combined
PluralKit__Bot__SocialLinkReplacers__OnlyFans__ResolvedUrlTemplate=https://embedez.com/embed/{key}
PluralKit__Bot__SocialLinkReplacers__Fansly__SourceHosts=fansly.com,*.fansly.com
PluralKit__Bot__SocialLinkReplacers__Fansly__ResolverUrl=https://embedez.com/api/v1/providers/combined
PluralKit__Bot__SocialLinkReplacers__Fansly__ResolvedUrlTemplate=https://embedez.com/embed/{key}

Co-authored-by: dvir001 <39403717+dvir001@users.noreply.github.com>
@dvir001

dvir001 commented Sep 28, 2026

Copy link
Copy Markdown
Owner

God forgive me for this sin of a PR.

@dvir001
dvir001 marked this pull request as ready for review September 28, 2026 13:58
Copilot AI lite review requested due to automatic review settings September 28, 2026 13:58
@dvir001
dvir001 merged commit 6656d0e into main Sep 28, 2026
5 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

Address the unresolved post-rewrite length and truncation issue.

Review effort: Lite
Findings: None

What changed in this PR

Adds resolver-backed OnlyFans and Fansly social-link rewriting through Embedez.

Changes:

  • Adds provider configuration to .env.example.
  • Adds regression tests for resolver requests and rewritten URLs.
  • Leaves production rewrite logic unchanged.
File Summary
PluralKit.Tests/​SocialLinkRewriterTests.cs Tests both providers and expected embed URLs.
.env.example Configures OnlyFans and Fansly resolvers; requires post-rewrite length validation before approval.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants