From c1c955031e71312e00713874acc05fd15e1e9f55 Mon Sep 17 00:00:00 2001 From: MeiMei <30769358+mei23@users.noreply.github.com> Date: Sun, 15 Sep 2019 23:27:33 +0900 Subject: [PATCH] Fix typo - invalied (#5433) * Fix typo - invelied * fix Valied --- src/remote/activitypub/models/note.ts | 2 +- src/remote/resolve-user.ts | 2 +- src/remote/webfinger.ts | 2 +- src/tools/resync-remote-user.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/remote/activitypub/models/note.ts b/src/remote/activitypub/models/note.ts index 6430813589..eb7cd6f81a 100644 --- a/src/remote/activitypub/models/note.ts +++ b/src/remote/activitypub/models/note.ts @@ -34,7 +34,7 @@ export function validateNote(object: any, uri: string) { } if (!validPost.includes(object.type)) { - return new Error(`invalid Note: invalied object type ${object.type}`); + return new Error(`invalid Note: invalid object type ${object.type}`); } if (object.id && extractDbHost(object.id) !== expectHost) { diff --git a/src/remote/resolve-user.ts b/src/remote/resolve-user.ts index 5253d684de..fa2110a55b 100644 --- a/src/remote/resolve-user.ts +++ b/src/remote/resolve-user.ts @@ -65,7 +65,7 @@ export async function resolveUser(username: string, host: string | null, option? // validate uri const uri = new URL(self.href); if (uri.hostname !== host) { - throw new Error(`Invalied uri`); + throw new Error(`Invalid uri`); } await Users.update({ diff --git a/src/remote/webfinger.ts b/src/remote/webfinger.ts index 101a31aabb..e19ef96a2f 100644 --- a/src/remote/webfinger.ts +++ b/src/remote/webfinger.ts @@ -40,5 +40,5 @@ function genUrl(query: string) { return `https://${hostname}/.well-known/webfinger?` + urlQuery({ resource: `acct:${query}` }); } - throw new Error(`Invalied query (${query})`); + throw new Error(`Invalid query (${query})`); } diff --git a/src/tools/resync-remote-user.ts b/src/tools/resync-remote-user.ts index 52f63cf1f1..c9d1ed588c 100644 --- a/src/tools/resync-remote-user.ts +++ b/src/tools/resync-remote-user.ts @@ -15,7 +15,7 @@ acct = acct.replace(/^@/, ''); // check args if (!acct.match(/^\w+@\w/)) { - throw `Invalied acct format. Valied format are user@host`; + throw `Invalid acct format. Valid format are user@host`; } console.log(`resync ${acct}`);