refactor(federation): 🔥 Refactor Note federation and creation code

This commit is contained in:
Jesse Wierzbinski 2025-04-08 18:13:30 +02:00
parent 54b2dfb78d
commit f79b0bc999
No known key found for this signature in database
19 changed files with 243 additions and 354 deletions

View file

@ -53,10 +53,7 @@ export default apiRoute((app) =>
),
);
if (
!(note && (await note.isViewableByUser(null))) ||
note.isRemote()
) {
if (!(note && (await note.isViewableByUser(null))) || note.remote) {
throw ApiError.noteNotFound();
}

View file

@ -63,10 +63,7 @@ export default apiRoute((app) =>
),
);
if (
!(note && (await note.isViewableByUser(null))) ||
note.isRemote()
) {
if (!(note && (await note.isViewableByUser(null))) || note.remote) {
throw ApiError.noteNotFound();
}

View file

@ -61,10 +61,7 @@ export default apiRoute((app) =>
),
);
if (
!(note && (await note.isViewableByUser(null))) ||
note.isRemote()
) {
if (!(note && (await note.isViewableByUser(null))) || note.remote) {
throw ApiError.noteNotFound();
}