mirror of
https://iceshrimp.dev/iceshrimp/iceshrimp
synced 2024-12-01 16:28:06 +09:00
parent
acbb7e1b4a
commit
f9f41c67bf
@ -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 New Issue
Block a user