mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-27 00:52:36 +03:00
Fixed usernames in Following list
This is a temporary solution whilst we only support Ghost2Ghost
This commit is contained in:
parent
df1774d8e9
commit
ddd803e1da
@ -175,6 +175,7 @@ describe('Actor', function () {
|
||||
await actor.postToInbox(activity);
|
||||
|
||||
assert(actor.following.find(follower => follower.id.href === newFollower.href));
|
||||
assert(actor.following.find(follower => follower.username === '@index@activitypub.server'));
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -69,7 +69,10 @@ export class Actor extends Entity<ActorData> {
|
||||
}
|
||||
if (activity.type === 'Accept') {
|
||||
// TODO: Check that the Accept is for a real Follow activity
|
||||
this.attr.following.push(activity.getObject());
|
||||
this.attr.following.push({
|
||||
id: activity.actorId,
|
||||
username: `@index@${activity.actorId.hostname}`
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user