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