summaryrefslogtreecommitdiff
path: root/src/remote/activitypub/renderer
diff options
context:
space:
mode:
Diffstat (limited to 'src/remote/activitypub/renderer')
-rw-r--r--src/remote/activitypub/renderer/follow.ts2
-rw-r--r--src/remote/activitypub/renderer/key.ts4
-rw-r--r--src/remote/activitypub/renderer/like.ts12
-rw-r--r--src/remote/activitypub/renderer/note.ts2
-rw-r--r--src/remote/activitypub/renderer/person.ts2
5 files changed, 10 insertions, 12 deletions
diff --git a/src/remote/activitypub/renderer/follow.ts b/src/remote/activitypub/renderer/follow.ts
index 89993d9458..bf8eeff06b 100644
--- a/src/remote/activitypub/renderer/follow.ts
+++ b/src/remote/activitypub/renderer/follow.ts
@@ -3,6 +3,6 @@ import { IRemoteUser, ILocalUser } from '../../../models/user';
export default (follower: ILocalUser, followee: IRemoteUser) => ({
type: 'Follow',
- actor: `${config.url}/@${follower.username}`,
+ actor: `${config.url}/users/${follower._id}`,
object: followee.uri
});
diff --git a/src/remote/activitypub/renderer/key.ts b/src/remote/activitypub/renderer/key.ts
index 76e2f13bcc..0d5e52557c 100644
--- a/src/remote/activitypub/renderer/key.ts
+++ b/src/remote/activitypub/renderer/key.ts
@@ -3,8 +3,8 @@ import { extractPublic } from '../../../crypto_key';
import { ILocalUser } from '../../../models/user';
export default (user: ILocalUser) => ({
- id: `${config.url}/@${user.username}/publickey`,
+ id: `${config.url}/users/${user._id}/publickey`,
type: 'Key',
- owner: `${config.url}/@${user.username}`,
+ owner: `${config.url}/users/${user._id}`,
publicKeyPem: extractPublic(user.keypair)
});
diff --git a/src/remote/activitypub/renderer/like.ts b/src/remote/activitypub/renderer/like.ts
index 744896cc41..061a10ba84 100644
--- a/src/remote/activitypub/renderer/like.ts
+++ b/src/remote/activitypub/renderer/like.ts
@@ -1,10 +1,8 @@
import config from '../../../config';
import { ILocalUser } from '../../../models/user';
-export default (user: ILocalUser, note) => {
- return {
- type: 'Like',
- actor: `${config.url}/@${user.username}`,
- object: note.uri ? note.uri : `${config.url}/notes/${note._id}`
- };
-};
+export default (user: ILocalUser, note) => ({
+ type: 'Like',
+ actor: `${config.url}/users/${user._id}`,
+ object: note.uri ? note.uri : `${config.url}/notes/${note._id}`
+});
diff --git a/src/remote/activitypub/renderer/note.ts b/src/remote/activitypub/renderer/note.ts
index 48799af084..7cc388dc33 100644
--- a/src/remote/activitypub/renderer/note.ts
+++ b/src/remote/activitypub/renderer/note.ts
@@ -34,7 +34,7 @@ export default async (note: INote) => {
_id: note.userId
});
- const attributedTo = `${config.url}/@${user.username}`;
+ const attributedTo = `${config.url}/users/${user._id}`;
return {
id: `${config.url}/notes/${note._id}`,
diff --git a/src/remote/activitypub/renderer/person.ts b/src/remote/activitypub/renderer/person.ts
index 7ea6f532fb..82e261029c 100644
--- a/src/remote/activitypub/renderer/person.ts
+++ b/src/remote/activitypub/renderer/person.ts
@@ -3,7 +3,7 @@ import renderKey from './key';
import config from '../../../config';
export default user => {
- const id = `${config.url}/@${user.username}`;
+ const id = `${config.url}/users/${user._id}`;
return {
type: 'Person',