|
/** |
|
* checks an array of strings for domains which are not allowed in our groups |
|
* |
|
* @param links array of strings that may contain a link |
|
* @returns false if the link is NOT allowed, true otherwise |
|
*/ |
|
export async function checkForAllowedLinks(links: string[]): Promise<boolean> { |
|
for (const url of links) { |
|
// these websites are simply not allowed |
|
if (BANNED_DOMAINS.some((domain) => url.includes(domain))) return false |
|
|
We should add exceptions to this rule, in groups where specific links are allowed.
For example, forms.gle links should be allowed in polimijobs as application method.
telegram/src/middlewares/auto-moderation-stack/functions.ts
Lines 3 to 13 in 797c7f8
We should add exceptions to this rule, in groups where specific links are allowed.
For example,
forms.glelinks should be allowed in polimijobs as application method.