Skip to content

Node.js based forum software built for the modern web

feat: send name property in getActor response

Julian Lam5e1e809962bc
diff --git a/src/activitypub/index.js b/src/activitypub/index.js
index 721cb52159..368f249319 100644
--- a/src/activitypub/index.js
+++ b/src/activitypub/index.js
@@ -89,6 +89,7 @@ ActivityPub.mockProfile = async (actors, callerUid = 0) => {
uid,
username: `${preferredUsername}@${hostname}`,
userslug: `${preferredUsername}@${hostname}`,
+ displayname: name,
fullname: name,
joindate: new Date(published).getTime(),
picture,
diff --git a/src/controllers/activitypub/index.js b/src/controllers/activitypub/index.js
index 4477efeb38..201216b365 100644
--- a/src/controllers/activitypub/index.js
+++ b/src/controllers/activitypub/index.js
@@ -15,7 +15,7 @@ Controller.getActor = async (req, res) => {
// todo: view:users priv gate
const { userslug } = req.params;
const { uid } = res.locals;
- const { username, aboutme, picture, 'cover:url': cover } = await user.getUserData(uid);
+ const { username, displayname: name, aboutme, picture, 'cover:url': cover } = await user.getUserData(uid);
const publicKey = await activitypub.getPublicKey(uid);
res.status(200).json({
@@ -31,6 +31,7 @@ Controller.getActor = async (req, res) => {
outbox: `${nconf.get('url')}/user/${userslug}/outbox`,
type: 'Person',
+ name,
preferredUsername: username,
summary: aboutme,
icon: picture ? `${nconf.get('url')}${picture}` : null,