mirror of
https://activitypub.software/TransFem-org/Sharkey.git
synced 2024-12-14 14:15:43 +01:00
parent
75ab146860
commit
c1c955031e
4 changed files with 4 additions and 4 deletions
|
@ -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) {
|
||||
|
|
|
@ -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({
|
||||
|
|
|
@ -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})`);
|
||||
}
|
||||
|
|
|
@ -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}`);
|
||||
|
|
Loading…
Reference in a new issue