Commit 3d8485fe authored by Him188's avatar Him188

Fix `.last` bug

parent f91aa4a4
...@@ -553,7 +553,7 @@ internal class GroupImpl( ...@@ -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( ...@@ -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 { ...@@ -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(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment