This commit is contained in:
Him188 2020-04-03 10:32:44 +08:00
parent 6590d8ade7
commit 18c5911666
3 changed files with 5 additions and 9 deletions

View File

@ -25,7 +25,6 @@ import net.mamoe.mirai.qqandroid.network.protocol.data.proto.MsgComm
import net.mamoe.mirai.qqandroid.network.protocol.data.proto.SourceMsg
import net.mamoe.mirai.qqandroid.network.protocol.packet.EMPTY_BYTE_ARRAY
import net.mamoe.mirai.qqandroid.network.protocol.packet.chat.receive.OnlinePush
import net.mamoe.mirai.qqandroid.utils._miraiContentToString
import net.mamoe.mirai.qqandroid.utils.io.serialization.loadAs
import net.mamoe.mirai.qqandroid.utils.io.serialization.toByteArray
import net.mamoe.mirai.utils.MiraiExperimentalAPI
@ -33,10 +32,6 @@ import net.mamoe.mirai.utils.MiraiExperimentalAPI
internal class MessageSourceFromServer(
val delegate: ImMsgBody.SourceMsg
) : MessageSource {
init {
println("MessageSourceFromServer: ${delegate._miraiContentToString()}")
}
override val time: Long get() = delegate.time.toLong() and 0xFFFFFFFF
override val originalMessage: MessageChain by lazy {

View File

@ -13,7 +13,6 @@
package net.mamoe.mirai.message.data
import net.mamoe.mirai.Bot
import net.mamoe.mirai.contact.Group
import net.mamoe.mirai.utils.LazyProperty
import kotlin.jvm.JvmMultifileClass
import kotlin.jvm.JvmName
@ -43,6 +42,8 @@ interface MessageSource : Message, MessageMetadata {
* Mirai 中使用的 id.
* 32 位为 [sequenceId],
* 32 位为 [messageRandom]
*
* @see ensureSequenceIdAvailable 确保 sequenceId 可用
*/
val id: Long
@ -59,7 +60,7 @@ interface MessageSource : Message, MessageMetadata {
val time: Long
/**
* 发送人. 可以为机器人自己
* 发送人. 可以为机器人自己 (`BotAsQQ`, `BotAsMember`)
*/
val senderId: Long