2
0
mirror of https://github.com/thedevs-network/the-guard-bot synced 2025-08-29 13:17:56 +00:00

Merge pull request #103 from C0rn3j/patch-1

Fix up grammar to please my OCD
This commit is contained in:
Simon Schürrle 2019-06-23 02:56:41 +02:00 committed by GitHub
commit 74ea42c814
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -86,7 +86,7 @@ const isPublic = async username => {
}; };
const dh = { const dh = {
blacklistedDomain: R.always(Action.Warn('Link to blacklisted domain')), blacklistedDomain: R.always(Action.Warn('Link to a blacklisted domain')),
nothing: R.always(Action.Nothing), nothing: R.always(Action.Nothing),
tme: async url => { tme: async url => {
if (url.pathname === '/') return Action.Nothing; if (url.pathname === '/') return Action.Nothing;
@ -98,7 +98,7 @@ const dh = {
if (await managesGroup({ link: url.toString() })) return Action.Nothing; if (await managesGroup({ link: url.toString() })) return Action.Nothing;
const [ , username ] = R.match(/^\/(\w+)(?:\/\d*)?$/, url.pathname); const [ , username ] = R.match(/^\/(\w+)(?:\/\d*)?$/, url.pathname);
if (username && !await isPublic('@' + username)) return Action.Nothing; if (username && !await isPublic('@' + username)) return Action.Nothing;
return Action.Warn('Link to Telegram group or channel'); return Action.Warn('Link to a Telegram group or channel');
}, },
}; };