Skip to content

Add an option to fix the subdomains of a custom website - #123

Open
seirenkr wants to merge 3 commits into
Kyrela:mainfrom
seirenkr:feat/custom-websites-subdomains
Open

seirenkr wants to merge 3 commits into
Kyrela:mainfrom
seirenkr:feat/custom-websites-subdomains

Conversation

@seirenkr

@seirenkr seirenkr commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Built on top of #122 (Components V2), whose commits also show up here until it is merged. The change itself is the last commit: seirenkr/FixTweetBot@feat/components-v2...feat/custom-websites-subdomains

Summary

A custom website only matches its exact domain (and www.), so a website such as dcinside.com has to be registered once per subdomain (gall., m., …), while a server without premium is limited to three custom websites.

  • The custom website modal gets a checkbox, "Also fix its subdomains". Typing the domain as *.domain.com does the same, and that is how such a website is displayed in the settings.
  • The fixed link is https://<fixed domain>/<path>, whatever the subdomain.
  • The most specific website wins: m.example.com takes precedence over example.com with its subdomains.
  • A link to the fixed domain of such a website is not fixed again, as a fixer can be a subdomain of the website it fixes.
  • The websites without the option behave exactly as before.

Database

New column custom_websites.match_subdomains (boolean, false by default, after fix_domain). The migration was generated with masonite-orm migration.

Test plan

  • Matching rules checked by script: the exact domain and www. only without the option; any depth of subdomain with it; the most specific website first; the fixed domain never fixed again; nothing matched inside another domain (notexample.com, example.com.evil.example, the domain placed in a path, a query or a fragment).
  • Migration applied, rolled back and applied again on MariaDB 12.
  • Every screen, button and modal of the settings exercised on this branch, with the same scripts as Rebuild the settings with Components V2 #122.
  • Used on a test server: dcinside.com → fxdcinside.com with the option on, a link to one of its subdomains fixed.

Written with Claude Code (Claude Fable 5.2, credited as co-author of the commits).

🤖 Generated with Claude Code

seirenkr and others added 3 commits November 12, 2026 08:15
Every screen of `/settings` is now a container made of texts, sections and action rows instead of an embed followed
by buttons: a toggle sits next to the state it changes, and the texts are no longer limited by the embed fields.
The modals wrap their inputs in labels, as the label of a text input itself is deprecated.

The screens keep their content and their behaviour. The differences:
- the websites are still listed in a single select, but its pages are changed from inside the list ("Previous page"
  and "Next page" options) instead of a button below it;
- the custom websites select describes each website with its fixed domain, and is hidden when there is none;
- the filter and reply method screens start with their description, like the other screens;
- the texts are built with the locale of the interaction: discore only sets it when a command is invoked, so a
  screen refreshed by a button could come back in the language of the last command, whoever invoked it;
- editing a keyword without changing it no longer answers that it already exists;
- the texts typed in the modals are stripped: a blank keyword is ignored, a custom website without a name is listed
  by its domain, and a translation language has to be two letters.

The strings that are no longer used are removed from the source locale (and from the Korean one).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
`/remove_premium` also stops after reporting a failure, instead of answering the interaction a second time.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A custom website only matched its exact domain (and `www.`), so a website such as dcinside.com had to be registered
once per subdomain (`gall.`, `m.`, …). Its modal now has a checkbox to fix every subdomain as well; typing
`*.domain.com` does the same, and that is how such a website is displayed.

- The fixed link is `https://<fixed domain>/<path>`, whatever the subdomain.
- The most specific website wins: `m.example.com` takes precedence over `example.com` and its subdomains.
- A link to the fixed domain of such a website is not fixed again, as a fixer can be a subdomain of the website it
  fixes.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@seirenkr
seirenkr marked this pull request as ready for review November 12, 2026 04:47
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.

1 participant