Use Group.id for sending MusicShare

fix #918
This commit is contained in:
Karlatemp 2021-01-26 22:45:19 +08:00
parent 1df5479c0b
commit 3dea0f7dd7
No known key found for this signature in database
GPG Key ID: 21FBDDF664FF06F8

View File

@ -11,7 +11,6 @@ package net.mamoe.mirai.internal.network.protocol.packet.chat
import net.mamoe.mirai.contact.Group
import net.mamoe.mirai.internal.contact.takeSingleContent
import net.mamoe.mirai.internal.contact.uin
import net.mamoe.mirai.internal.message.OnlineMessageSourceToGroupImpl
import net.mamoe.mirai.internal.network.QQAndroidClient
import net.mamoe.mirai.internal.network.protocol.packet.OutgoingPacket
@ -34,7 +33,7 @@ internal object SendMessageMultiProtocol {
contract { callsInPlace(sourceCallback, InvocationKind.AT_MOST_ONCE) }
message.takeSingleContent<MusicShare>()?.let { musicShare ->
return listOf(MusicSharePacket(client, musicShare, group.uin, targetKind = MessageSourceKind.GROUP))
return listOf(MusicSharePacket(client, musicShare, group.id, targetKind = MessageSourceKind.GROUP))
}
return MessageSvcPbSendMsg.createToGroup(client, group, message, fragmented, sourceCallback)