mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-09 01:30:17 +08:00
Fix #383
This commit is contained in:
parent
34d70f9d5b
commit
89386904b1
@ -705,7 +705,13 @@ internal abstract class QQAndroidBotBase constructor(
|
||||
|
||||
@LowLevelAPI
|
||||
@MiraiExperimentalAPI
|
||||
override suspend fun _lowLevelSolveNewFriendRequestEvent(eventId: Long, fromId: Long, fromNick: String, accept: Boolean, blackList: Boolean) {
|
||||
override suspend fun _lowLevelSolveNewFriendRequestEvent(
|
||||
eventId: Long,
|
||||
fromId: Long,
|
||||
fromNick: String,
|
||||
accept: Boolean,
|
||||
blackList: Boolean
|
||||
) {
|
||||
network.apply {
|
||||
NewContact.SystemMsgNewFriend.Action(
|
||||
bot.client,
|
||||
@ -761,16 +767,17 @@ internal abstract class QQAndroidBotBase constructor(
|
||||
accept = accept,
|
||||
blackList = blackList
|
||||
).sendWithoutExpect()
|
||||
groups[groupId].apply {
|
||||
members.delegate.addLast(newMember(object : MemberInfo {
|
||||
override val nameCard: String get() = ""
|
||||
override val permission: MemberPermission get() = MemberPermission.MEMBER
|
||||
override val specialTitle: String get() = ""
|
||||
override val muteTimestamp: Int get() = 0
|
||||
override val uin: Long get() = fromId
|
||||
override val nick: String get() = fromNick
|
||||
}))
|
||||
}
|
||||
if (accept ?: return)
|
||||
groups[groupId].apply {
|
||||
members.delegate.addLast(newMember(object : MemberInfo {
|
||||
override val nameCard: String get() = ""
|
||||
override val permission: MemberPermission get() = MemberPermission.MEMBER
|
||||
override val specialTitle: String get() = ""
|
||||
override val muteTimestamp: Int get() = 0
|
||||
override val uin: Long get() = fromId
|
||||
override val nick: String get() = fromNick
|
||||
}))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user