Skip to content

Commit

Permalink
fix: send handle as category actor's preferredUsername, #12434
Browse files Browse the repository at this point in the history
  • Loading branch information
julianlam committed Mar 22, 2024
1 parent 9dc20d0 commit 803975f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/activitypub/mocks.js
Expand Up @@ -170,7 +170,10 @@ Mocks.actors.user = async (uid) => {
};

Mocks.actors.category = async (cid) => {
let { name, slug, description: summary, backgroundImage } = await categories.getCategoryData(cid);
let {
name, handle: preferredUsername, slug,
description: summary, backgroundImage,
} = await categories.getCategoryData(cid);
const publicKey = await activitypub.getPublicKey('cid', cid);

backgroundImage = backgroundImage || meta.config['brand:logo'] || `${nconf.get('relative_path')}/assets/logo.png`;
Expand All @@ -193,7 +196,7 @@ Mocks.actors.category = async (cid) => {

type: 'Group',
name,
preferredUsername: `cid.${cid}`,
preferredUsername,
summary,
icon: backgroundImage,

Expand Down

0 comments on commit 803975f

Please sign in to comment.