server: add doc for cancelFollowRequest

This commit is contained in:
Norm 2022-12-22 16:50:46 -05:00
parent 549302e9c0
commit 4db25e4b1f
Signed by untrusted user: norm
GPG key ID: 7123E30E441E80DE

View file

@ -7,6 +7,11 @@ import { IdentifiableError } from '@/misc/identifiable-error.js';
import { User } from '@/models/entities/user.js';
import { Users, FollowRequests } from '@/models/index.js';
/**
* Cancel a follow request from `follower` to `followee`.
* @param followee User that was going to be followed
* @param follower User who is making the follow request
*/
export async function cancelFollowRequest(followee: User, follower: User): Promise<void> {
if (Users.isRemoteUser(followee)) {
const content = renderActivity(renderUndo(renderFollow(follower, followee), follower));