feat: send name property in getActor response

This commit is contained in:
Julian Lam
2024-01-08 14:46:43 -05:00
parent 9221506b0f
commit 5e1e809962
2 changed files with 3 additions and 1 deletions

View File

@@ -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,