mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-09 13:01:00 +00:00
refactor(telegram): keep the bare help and greeting words in a per-locale table
The two word lists lived inside the webhook handler and had no entry for Dutch or Korean. They move to their own module, keyed by locale so the compiler names a language that has none, and gain "hulp", "hoi", "goedemorgen", "도움말", "도움", "안녕" and "안녕하세요" beside the Portuguese words. The bot still matches the union on the folded text.
This commit is contained in:
1 parent
6c15a66cde
commit
945e998516
3 files changed
+54
-48
No files matched your search
@@ -566,6 +566,9 @@ describe("Telegram webhook — text-message dispatch", () => {
|
||||
["ayuda", 213],
|
||||
["aiuto", 214],
|
||||
["Pomoc", 215],
|
||||
["hulp", 217],
|
||||
["도움말", 218],
|
||||
["Ajuda", 219],
|
||||
])("answers the bare help word %s", async (word, updateId) => {
|
||||
const res = await POST(
|
||||
tgRequest({
|
||||
@@ -602,6 +605,9 @@ describe("Telegram webhook — text-message dispatch", () => {
|
||||
["Hola", 221],
|
||||
["ciao", 222],
|
||||
["cześć", 223],
|
||||
["Hoi", 224],
|
||||
["안녕하세요", 225],
|
||||
["Olá", 226],
|
||||
])("answers the greeting %s", async (word, updateId) => {
|
||||
const res = await POST(
|
||||
tgRequest({
|
||||
|
||||
Reference in new issue
Block a user