forked from FoundKeyGang/FoundKey
Merge branch 'develop' of https://github.com/syuilo/misskey into develop
This commit is contained in:
commit
a6c3663155
1 changed files with 10 additions and 1 deletions
|
@ -153,8 +153,17 @@ export default async function(follower: IUser, followee: IUser, requestId?: stri
|
||||||
if (followee.isLocked || (followee.carefulBot && follower.isBot) || (isLocalUser(follower) && isRemoteUser(followee))) {
|
if (followee.isLocked || (followee.carefulBot && follower.isBot) || (isLocalUser(follower) && isRemoteUser(followee))) {
|
||||||
let autoAccept = false;
|
let autoAccept = false;
|
||||||
|
|
||||||
|
// 鍵アカウントであっても、既にフォローされていた場合はスルー
|
||||||
|
const following = await Following.findOne({
|
||||||
|
followerId: follower._id,
|
||||||
|
followeeId: followee._id,
|
||||||
|
});
|
||||||
|
if (following) {
|
||||||
|
autoAccept = true;
|
||||||
|
}
|
||||||
|
|
||||||
// フォローしているユーザーは自動承認オプション
|
// フォローしているユーザーは自動承認オプション
|
||||||
if (isLocalUser(followee) && followee.autoAcceptFollowed) {
|
if (!autoAccept && (isLocalUser(followee) && followee.autoAcceptFollowed)) {
|
||||||
const followed = await Following.findOne({
|
const followed = await Following.findOne({
|
||||||
followerId: followee._id,
|
followerId: followee._id,
|
||||||
followeeId: follower._id
|
followeeId: follower._id
|
||||||
|
|
Loading…
Reference in a new issue