mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-24 06:50:08 +08:00
Don't add new friend when reject new friend request
This commit is contained in:
parent
e7e8d8ca6a
commit
addee38c70
@ -20,7 +20,6 @@ import kotlinx.coroutines.withContext
|
||||
import kotlinx.io.core.discardExact
|
||||
import kotlinx.io.core.readBytes
|
||||
import kotlinx.serialization.json.*
|
||||
import net.mamoe.kjbb.JvmBlockingBridge
|
||||
import net.mamoe.mirai.*
|
||||
import net.mamoe.mirai.contact.*
|
||||
import net.mamoe.mirai.data.*
|
||||
@ -794,6 +793,9 @@ internal open class MiraiImpl : IMirai, LowLevelApiAccessor {
|
||||
accept = accept,
|
||||
blackList = blackList
|
||||
).sendWithoutExpect()
|
||||
|
||||
if (!accept) return@apply
|
||||
|
||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
bot.friends.delegate.add(newFriend(bot, FriendInfoImpl(fromId, fromNick, "")))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user