summaryrefslogtreecommitdiff
path: root/routes.js
diff options
context:
space:
mode:
authorDarius Kazemi <darius.kazemi@gmail.com>2020-01-06 23:16:52 -0800
committerDarius Kazemi <darius.kazemi@gmail.com>2020-01-06 23:16:52 -0800
commita4392c4c663b6b23da7320d95b5a4b23f474f213 (patch)
treeaf3c8fe7ab2b6dbf6e714149f4c2ab97bd56bd48 /routes.js
parent8138b5757bed1beb9c21f1e32a3fc9920e989f49 (diff)
minor fixes
Diffstat (limited to 'routes.js')
-rwxr-xr-xroutes.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/routes.js b/routes.js
index cd81da5..e90360c 100755
--- a/routes.js
+++ b/routes.js
@@ -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 } } }