mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-24 06:50:08 +08:00
Fix .last
bug
This commit is contained in:
parent
f91aa4a4cd
commit
3d8485fee5
@ -553,7 +553,7 @@ internal class GroupImpl(
|
||||
if (event.isCancelled) {
|
||||
throw EventCancelledException("cancelled by FriendMessageSendEvent")
|
||||
}
|
||||
lateinit var source: MessageSource
|
||||
lateinit var source: MessageSvc.PbSendMsg.MessageSourceFromSend
|
||||
bot.network.run {
|
||||
val response: MessageSvc.PbSendMsg.Response = MessageSvc.PbSendMsg.ToGroup(
|
||||
bot.client,
|
||||
@ -565,8 +565,7 @@ internal class GroupImpl(
|
||||
) { "send message failed: $response" }
|
||||
}
|
||||
|
||||
((message.last() as MessageSource) as MessageSvc.PbSendMsg.MessageSourceFromSend)
|
||||
.startWaitingSequenceId(this)
|
||||
source.startWaitingSequenceId(this)
|
||||
|
||||
return MessageReceipt(message, source, this)
|
||||
}
|
||||
|
@ -354,7 +354,7 @@ internal class MessageSvc {
|
||||
client: QQAndroidClient,
|
||||
groupCode: Long,
|
||||
message: MessageChain,
|
||||
sourceCallback: (MessageSource) -> Unit
|
||||
sourceCallback: (MessageSourceFromSend) -> Unit
|
||||
): OutgoingPacket {
|
||||
|
||||
val source = MessageSourceFromSend(
|
||||
|
Loading…
Reference in New Issue
Block a user