mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-02 20:16:04 +01:00
feat: actor cache, method to resolve inboxes, stub code for sending requests. Now base64 encoding digest as expected by Mastodon
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
const nconf = require('nconf');
|
||||
|
||||
const user = require('../user');
|
||||
const user = require('../../user');
|
||||
const activitypub = require('../../activitypub');
|
||||
|
||||
const Controller = module.exports;
|
||||
@@ -103,3 +103,24 @@ Controller.postInbox = async (req, res) => {
|
||||
|
||||
res.sendStatus(201);
|
||||
};
|
||||
|
||||
/**
|
||||
* Main ActivityPub verbs
|
||||
*/
|
||||
|
||||
Controller.follow = async (req, res) => {
|
||||
await activitypub.send(req.uid, req.params.uid, {
|
||||
type: 'Follow',
|
||||
object: {
|
||||
type: 'Person',
|
||||
name: req.params.uid,
|
||||
},
|
||||
});
|
||||
|
||||
res.sendStatus(201);
|
||||
};
|
||||
|
||||
Controller.unfollow = async (req, res) => {
|
||||
console.log('got here');
|
||||
res.sendStatus(201);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user