forked from mirrors/misskey
Implement following stats
This commit is contained in:
@@ -7,6 +7,7 @@ import renderFollow from '../../remote/activitypub/renderer/follow';
|
||||
import renderAccept from '../../remote/activitypub/renderer/accept';
|
||||
import { deliver } from '../../queue';
|
||||
import createFollowRequest from './requests/create';
|
||||
import { followingStats } from '../stats';
|
||||
|
||||
export default async function(follower: IUser, followee: IUser, requestId?: string) {
|
||||
// フォロー対象が鍵アカウントである or
|
||||
@@ -52,6 +53,8 @@ export default async function(follower: IUser, followee: IUser, requestId?: stri
|
||||
});
|
||||
//#endregion
|
||||
|
||||
followingStats.update(follower, followee, true);
|
||||
|
||||
// Publish follow event
|
||||
if (isLocalUser(follower)) {
|
||||
packUser(followee, follower).then(packed => publishMainStream(follower._id, 'follow', packed));
|
||||
|
||||
Reference in New Issue
Block a user