mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-24 15:00:38 +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.discardExact
|
||||||
import kotlinx.io.core.readBytes
|
import kotlinx.io.core.readBytes
|
||||||
import kotlinx.serialization.json.*
|
import kotlinx.serialization.json.*
|
||||||
import net.mamoe.kjbb.JvmBlockingBridge
|
|
||||||
import net.mamoe.mirai.*
|
import net.mamoe.mirai.*
|
||||||
import net.mamoe.mirai.contact.*
|
import net.mamoe.mirai.contact.*
|
||||||
import net.mamoe.mirai.data.*
|
import net.mamoe.mirai.data.*
|
||||||
@ -794,6 +793,9 @@ internal open class MiraiImpl : IMirai, LowLevelApiAccessor {
|
|||||||
accept = accept,
|
accept = accept,
|
||||||
blackList = blackList
|
blackList = blackList
|
||||||
).sendWithoutExpect()
|
).sendWithoutExpect()
|
||||||
|
|
||||||
|
if (!accept) return@apply
|
||||||
|
|
||||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||||
bot.friends.delegate.add(newFriend(bot, FriendInfoImpl(fromId, fromNick, "")))
|
bot.friends.delegate.add(newFriend(bot, FriendInfoImpl(fromId, fromNick, "")))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user