mirror of
https://github.com/hansjone/dsh-im-ops.git
synced 2026-10-09 03:03:24 +08:00
fix(whatsapp): handle group mentions and caller allowlists
This commit is contained in:
parent
54468bbe1e
commit
9664e85599
13 changed files with 563 additions and 214 deletions
|
|
@ -97,6 +97,11 @@ function normalizeBot(value) {
|
|||
typeof entry === 'string' && /^[1-9]\d{4,14}$/.test(entry)
|
||||
)))]
|
||||
: [],
|
||||
groupAllowedNumbers: Array.isArray(value.accessPolicy?.groupAllowedNumbers)
|
||||
? [...new Set(value.accessPolicy.groupAllowedNumbers.filter((entry) => (
|
||||
typeof entry === 'string' && /^[1-9]\d{4,14}$/.test(entry)
|
||||
)))]
|
||||
: [],
|
||||
},
|
||||
bot: {
|
||||
name: text(value.bot?.name, 'WhatsApp机器人', 100),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue