mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2025-03-04 07:18:50 -07:00
Fix #4326
This commit is contained in:
parent
0a2cc8078c
commit
153b48fa37
1 changed files with 6 additions and 6 deletions
|
@ -8,14 +8,14 @@ import { publishMainStream } from '../../stream';
|
|||
import { insertFollowingDoc } from '../create';
|
||||
|
||||
export default async function(followee: IUser, follower: IUser) {
|
||||
const request = await FollowRequest.findOne({
|
||||
followeeId: followee._id,
|
||||
followerId: follower._id
|
||||
});
|
||||
|
||||
await insertFollowingDoc(followee, follower);
|
||||
|
||||
if (isRemoteUser(follower)) {
|
||||
const request = await FollowRequest.findOne({
|
||||
followeeId: followee._id,
|
||||
followerId: follower._id
|
||||
});
|
||||
|
||||
if (isRemoteUser(follower) && request) {
|
||||
const content = renderActivity(renderAccept(renderFollow(follower, followee, request.requestId), followee as ILocalUser));
|
||||
deliver(followee as ILocalUser, content, follower.inbox);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue