Skip to content

feat(discord): add customizable message template with placeholder tokens#4441

Open
0lnp wants to merge 4 commits into
miniflux:mainfrom
0lnp:feat/discord-template
Open

feat(discord): add customizable message template with placeholder tokens#4441
0lnp wants to merge 4 commits into
miniflux:mainfrom
0lnp:feat/discord-template

Conversation

@0lnp

@0lnp 0lnp commented Jul 4, 2026

Copy link
Copy Markdown

Add support for user-defined Discord message templates using placeholder tokens ({title}, {url}, {description}, {author}, {date}, {feed_title}, {feed_url}). When a template is set, the Discord embed uses a rendered description instead of the default field-based layout.

  • Add template rendering with HTML stripping and 500-rune content truncation
  • Add ValidateTemplate to reject unrecognized {tokens}
  • Truncate rendered output to 4000 runes (Discord limit)
  • Add discord_message_template column via database migration
  • Add template input field and help text in integration settings UI
  • Add i18n keys for all 22 non-English locales
  • Add unit tests for template rendering, validation, and data building

@0lnp 0lnp marked this pull request as draft July 4, 2026 15:08
@0lnp 0lnp changed the title Add Discord message template feature and translations feat(discord): add customizable message template with placeholder tokens Jul 4, 2026
@0lnp

0lnp commented Jul 4, 2026

Copy link
Copy Markdown
Author
Screenshot_20260705_145920

Which renders as:

Screenshot_20260705_145838

@0lnp 0lnp marked this pull request as ready for review July 4, 2026 15:29
Ken added 4 commits July 5, 2026 12:22
Added 4 translation keys for Discord message template feature:
- form.integration.discord_message_template
- form.integration.discord_template_help
- form.integration.discord_template_variables
- error.discord_invalid_template

Added to all 22 non-English locale files: ar_SA, de_DE, el_EL, es_ES,
fi_FI, fr_FR, gl_ES, hi_IN, id_ID, it_IT, ja_JP, ko_KR,
nan_Latn_pehoeji, nl_NL, pl_PL, pt_BR, ro_RO, ru_RU, tr_TR,
uk_UA, zh_CN, zh_TW.

Note: All translations were generated by LLM.
Note: All translations were generated by LLM.
@0lnp 0lnp force-pushed the feat/discord-template branch from 2664dce to e9b671b Compare July 5, 2026 05:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant