mirror of
https://github.com/paricafe/misskey.git
synced 2024-11-25 01:36:43 -06:00
commit
a7ff8678b5
3 changed files with 3 additions and 3 deletions
|
@ -5,7 +5,7 @@ import accept from '../../../../services/following/requests/accept';
|
|||
import { IFollow } from '../../type';
|
||||
|
||||
export default async (actor: IRemoteUser, activity: IFollow): Promise<void> => {
|
||||
const id = typeof activity.object == 'string' ? activity.object : activity.object.id;
|
||||
const id = typeof activity.actor == 'string' ? activity.actor : activity.actor.id;
|
||||
|
||||
if (!id.startsWith(config.url + '/')) {
|
||||
return null;
|
||||
|
|
|
@ -5,7 +5,7 @@ import reject from '../../../../services/following/requests/reject';
|
|||
import { IFollow } from '../../type';
|
||||
|
||||
export default async (actor: IRemoteUser, activity: IFollow): Promise<void> => {
|
||||
const id = typeof activity.object == 'string' ? activity.object : activity.object.id;
|
||||
const id = typeof activity.actor == 'string' ? activity.actor : activity.actor.id;
|
||||
|
||||
if (!id.startsWith(config.url + '/')) {
|
||||
return null;
|
||||
|
|
|
@ -31,7 +31,7 @@ export default async (actor: IRemoteUser, activity: IFollow): Promise<void> => {
|
|||
});
|
||||
|
||||
if (req) {
|
||||
await cancelRequest(actor, followee);
|
||||
await cancelRequest(followee, actor);
|
||||
} else {
|
||||
await unfollow(actor, followee);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue