mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-05 07:10:30 +01:00
feat: send name property in getActor response
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user