fix federation
All checks were successful
Build & Push Docker Image / build (push) Successful in 6m0s

This commit is contained in:
2026-02-27 15:06:38 +01:00
parent ffb7a45bfc
commit 83849bd2f6

View File

@@ -118,12 +118,15 @@ router.post('/receive', async (req, res) => {
}
const signature = req.headers['x-federation-signature'];
const payload = req.body;
const payload = req.body || {};
if (!signature) {
return res.status(401).json({ error: 'Missing federation signature' });
}
// Extract expected fields from the incoming payload
const { invite_id, from_user, to_user, room_name, message, join_url } = payload;
if (!invite_id || !from_user || !to_user || !room_name || !join_url) {
return res.status(400).json({ error: 'Incomplete invitation payload' });
}