fix federation
All checks were successful
Build & Push Docker Image / build (push) Successful in 6m0s
All checks were successful
Build & Push Docker Image / build (push) Successful in 6m0s
This commit is contained in:
@@ -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' });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user