From 4c0b48af5eb73996fa9e289eb08497ed6e9b4858 Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 30 Mar 2018 00:00:19 +0900 Subject: [PATCH] Use id instead of username Because username is mutable. id is immutable! --- src/models/user.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/models/user.ts b/src/models/user.ts index 4f2872800f..444a3e0992 100644 --- a/src/models/user.ts +++ b/src/models/user.ts @@ -306,7 +306,7 @@ export const packForAp = ( if (!_user) return reject('invalid user arg.'); - const userUrl = `${config.url}/@${_user.username}`; + const userUrl = `${config.url}/@@${_user._id}`; resolve({ "@context": ["https://www.w3.org/ns/activitystreams", {