Add check for delete user broadcasts for unknown users (unverifiable signature)

This commit is contained in:
william Murphy 2019-12-25 15:52:15 -06:00
parent ca0342f4e0
commit 4a0337bdad

View file

@ -35,7 +35,11 @@ async function verifySignature (req, res, next) {
} }
next() next()
} catch (err) { } catch (err) {
console.log('error during signature verification', err.message) if (req.body.type === 'Delete' && err.mesage.startsWith('410')) {
// user delete message that can't be verified because we don't have the user cached
res.status(200).send()
}
console.log('error during signature verification', err.message, req.body)
return res.status(500).send() return res.status(500).send()
} }
} }