diff options
author | Darius Kazemi <darius.kazemi@gmail.com> | 2020-01-06 23:16:52 -0800 |
---|---|---|
committer | Darius Kazemi <darius.kazemi@gmail.com> | 2020-01-06 23:16:52 -0800 |
commit | a4392c4c663b6b23da7320d95b5a4b23f474f213 (patch) | |
tree | af3c8fe7ab2b6dbf6e714149f4c2ab97bd56bd48 /routes.js | |
parent | 8138b5757bed1beb9c21f1e32a3fc9920e989f49 (diff) |
minor fixes
Diffstat (limited to 'routes.js')
-rwxr-xr-x | routes.js | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -1309,6 +1309,11 @@ router.post('/unattendevent/:eventID', (req, res) => { }); router.get('/oneclickunattendevent/:eventID/:attendeeID', (req, res) => { + // Mastodon will "click" links that sent to its users, presumably as a prefetch? + // Anyway, this ignores the automated clicks that are done without the user's knowledge + if (req.headers['user-agent'] && req.headers['user-agent'].includes('Mastodon')) { + return res.sendStatus(200); + } Event.update( { id: req.params.eventID }, { $pull: { attendees: { _id: req.params.attendeeID } } } |