bookmark/unbookmark from fediverse

This commit is contained in:
les
2019-08-08 16:52:13 +02:00
parent fc2c82ab1a
commit ca83f1c675
5 changed files with 39 additions and 15 deletions

View File

@@ -38,14 +38,14 @@ router.post('/u/:name/inbox', Helpers.verifySignature, async (req, res) => {
switch(b.type) {
case 'Follow':
Follows.follow(req, res, b, targetOrigin, domain)
Follows.follow(req, res)
break
case 'Undo':
// unfollow || unlike
if (b.object.type === 'Follow') {
Follows.unfollow(req, res, b, targetOrigin, domain)
} else if (b.object.type === 'Like') {
console.error('Unlike!')
Ego.unbookmark(req, res)
} else if (b.object.type === 'Announce') {
console.error('Unboost')
}
@@ -57,7 +57,7 @@ router.post('/u/:name/inbox', Helpers.verifySignature, async (req, res) => {
console.error('This is a note ! I probably should not receive this')
break
case 'Like':
Ego.like(req, res)
Ego.bookmark(req, res)
break
case 'Delete':
console.error('Delete ?!?!')