Skip to content

Commit c573bd3

Browse files
authored
AP Route (#4997)
* Negative Cache-Control * refactor user * a
1 parent 66cfc22 commit c573bd3

File tree

9 files changed

+136
-346
lines changed

9 files changed

+136
-346
lines changed

src/models/user.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ export interface IRemoteUser extends IUserBase {
236236
export type IUser = ILocalUser | IRemoteUser;
237237

238238
export const isLocalUser = (user: any): user is ILocalUser =>
239-
user.host === null;
239+
user.host == null;
240240

241241
export const isRemoteUser = (user: any): user is IRemoteUser =>
242242
!isLocalUser(user);

src/remote/activitypub/renderer/follow-user.ts

+2
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,7 @@ export default async function renderFollowUser(id: mongo.ObjectID): Promise<any>
1212
_id: id
1313
});
1414

15+
if (user == null) return null; // TODO
16+
1517
return isLocalUser(user) ? `${config.url}/users/${user._id}` : user.uri;
1618
}

0 commit comments

Comments
 (0)