mirror of
https://github.com/mamoe/mirai.git
synced 2025-04-25 04:50:26 +08:00
Remove BotJoinGroupEvent.Invite.invitorName as not provided by the server
This commit is contained in:
parent
0b62370d9d
commit
4ac4607902
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/packet/chat
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/events
@ -15,6 +15,7 @@ import kotlinx.io.core.ByteReadPacket
|
||||
import kotlinx.io.core.readBytes
|
||||
import net.mamoe.mirai.contact.Group
|
||||
import net.mamoe.mirai.event.events.*
|
||||
import net.mamoe.mirai.getGroupOrNull
|
||||
import net.mamoe.mirai.qqandroid.QQAndroidBot
|
||||
import net.mamoe.mirai.qqandroid.message.contextualBugReportException
|
||||
import net.mamoe.mirai.qqandroid.network.Packet
|
||||
@ -178,10 +179,10 @@ internal class NewContact {
|
||||
val group = bot.getNewGroup(groupCode) ?: return null
|
||||
val invitor = group[actionUin]
|
||||
|
||||
BotJoinGroupEvent.Invite(reqUinNick, invitor)
|
||||
BotJoinGroupEvent.Invite(invitor)
|
||||
}
|
||||
5 -> {
|
||||
val group = bot.getGroup(groupCode)
|
||||
val group = bot.getGroupOrNull(groupCode) ?: return null
|
||||
val operator = group[actionUin]
|
||||
BotLeaveEvent.Kick(operator)
|
||||
}
|
||||
|
@ -114,10 +114,6 @@ sealed class BotJoinGroupEvent : GroupEvent, Packet, AbstractEvent() {
|
||||
*/
|
||||
@MiraiExperimentalAPI
|
||||
data class Invite internal constructor(
|
||||
/**
|
||||
* 邀请人昵称 (可能为备注或群名片)
|
||||
*/
|
||||
val invitorName: String,
|
||||
/**
|
||||
* 邀请人
|
||||
*/
|
||||
@ -126,7 +122,7 @@ sealed class BotJoinGroupEvent : GroupEvent, Packet, AbstractEvent() {
|
||||
override val group: Group get() = invitor.group
|
||||
|
||||
override fun toString(): String {
|
||||
return "BotJoinGroupEvent.Invite(invitorName='$invitorName', invitor=$invitor)"
|
||||
return "BotJoinGroupEvent.Invite(invitor=$invitor)"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user