Merge pull request #1871 from mei23/mei-apreq3

フォロー申請結果とフォロー申請解除の処理の修正
This commit is contained in:
syuilo 2018-07-08 19:30:56 +09:00 committed by GitHub
commit a7ff8678b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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);
}