feat: fine-grained privileges integration for fediverse users and world pseudo-category

This commit is contained in:
Julian Lam
2024-02-26 11:39:32 -05:00
parent 28370b1043
commit 1bd8f9a1fa
16 changed files with 186 additions and 49 deletions

View File

@@ -48,7 +48,7 @@ middleware.validate = async function (req, res, next) {
const { actor, object } = req.body;
// Origin checking
if (typeof object !== 'string') {
if (typeof object !== 'string' && object.hasOwnProperty('id')) {
const actorHostname = new URL(actor).hostname;
const objectHostname = new URL(object.id).hostname;
if (actorHostname !== objectHostname) {