diff --git a/buildSrc/src/main/kotlin/analyzes/AndroidApiLevelCheck.kt b/buildSrc/src/main/kotlin/analyzes/AndroidApiLevelCheck.kt index 7ab6a717e..c5347a0cc 100644 --- a/buildSrc/src/main/kotlin/analyzes/AndroidApiLevelCheck.kt +++ b/buildSrc/src/main/kotlin/analyzes/AndroidApiLevelCheck.kt @@ -209,7 +209,8 @@ object AndroidApiLevelCheck { @Suppress("UNCHECKED_CAST") fun check(classes: File, level: Int, project: Project) { - val apiVersionsFile = project.rootProject.projectDir.resolve("buildSrc/src/main/resources/androidutil/api-versions.xml") + val apiVersionsFile = + project.rootProject.projectDir.resolve("buildSrc/src/main/resources/androidutil/api-versions.xml") val classesInfos = mutableMapOf() XmlParser().parse(apiVersionsFile).children().forEach { classNode -> classNode as Node diff --git a/mirai-core-api/src/commonMain/kotlin/LowLevelApiAccessor.kt b/mirai-core-api/src/commonMain/kotlin/LowLevelApiAccessor.kt index caad5c00a..e9a3aace6 100644 --- a/mirai-core-api/src/commonMain/kotlin/LowLevelApiAccessor.kt +++ b/mirai-core-api/src/commonMain/kotlin/LowLevelApiAccessor.kt @@ -179,7 +179,7 @@ public interface LowLevelApiAccessor { groupId: Long, image: GroupAnnouncementImage, announcement: GroupAnnouncement - ):String + ): String /** * 删除群公告 diff --git a/mirai-core-api/src/commonMain/kotlin/contact/Group.kt b/mirai-core-api/src/commonMain/kotlin/contact/Group.kt index 6752be224..58f9f58e7 100644 --- a/mirai-core-api/src/commonMain/kotlin/contact/Group.kt +++ b/mirai-core-api/src/commonMain/kotlin/contact/Group.kt @@ -158,7 +158,6 @@ public interface Group : Contact, CoroutineScope, FileSupported, VoiceSupported this.sendMessage(message.toPlainText()) - /** * 将一条消息设置为群精华消息, 需要管理员或群主权限. * 操作成功返回 `true`. diff --git a/mirai-core-api/src/commonMain/kotlin/event/events/group.kt b/mirai-core-api/src/commonMain/kotlin/event/events/group.kt index 7566e4d8c..253086b7f 100644 --- a/mirai-core-api/src/commonMain/kotlin/event/events/group.kt +++ b/mirai-core-api/src/commonMain/kotlin/event/events/group.kt @@ -9,7 +9,8 @@ @file:JvmMultifileClass @file:JvmName("BotEventsKt") -@file:Suppress("unused", "FunctionName", "INVISIBLE_REFERENCE", "INVISIBLE_MEMBER", "DEPRECATION_ERROR", +@file:Suppress( + "unused", "FunctionName", "INVISIBLE_REFERENCE", "INVISIBLE_MEMBER", "DEPRECATION_ERROR", "MemberVisibilityCanBePrivate" ) @@ -98,7 +99,8 @@ public data class BotUnmuteEvent @MiraiInternalApi constructor( /** * Bot 成功加入了一个新群 */ -public sealed class BotJoinGroupEvent : GroupEvent, BotPassiveEvent, Packet, AbstractEvent(), GroupMemberInfoChangeEvent { +public sealed class BotJoinGroupEvent : GroupEvent, BotPassiveEvent, Packet, AbstractEvent(), + GroupMemberInfoChangeEvent { public abstract override val group: Group /** diff --git a/mirai-core-api/src/commonMain/kotlin/internal/utils/StdoutLogger.kt b/mirai-core-api/src/commonMain/kotlin/internal/utils/StdoutLogger.kt index 33ee75c4b..2b1f92f24 100644 --- a/mirai-core-api/src/commonMain/kotlin/internal/utils/StdoutLogger.kt +++ b/mirai-core-api/src/commonMain/kotlin/internal/utils/StdoutLogger.kt @@ -101,6 +101,7 @@ internal open class StdoutLogger constructor( if (e != null) debug((message ?: e.toString()) + "\n${e.stackTraceToString()}") else debug(message.toString()) } + protected open val timeFormat: DateFormat = SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.SIMPLIFIED_CHINESE) private val currentTimeFormatted get() = timeFormat.format(Date()) diff --git a/mirai-core-api/src/commonMain/kotlin/message/code/internal/impl.kt b/mirai-core-api/src/commonMain/kotlin/message/code/internal/impl.kt index a53374472..c44ebeb85 100644 --- a/mirai-core-api/src/commonMain/kotlin/message/code/internal/impl.kt +++ b/mirai-core-api/src/commonMain/kotlin/message/code/internal/impl.kt @@ -92,7 +92,7 @@ private fun String.forEachMiraiCode(block: (origin: String, name: String?, args: } @Suppress("DELEGATED_MEMBER_HIDES_SUPERTYPE_OVERRIDE") -private object MiraiCodeParsers: AbstractMap(), Map by mapOf( +private object MiraiCodeParsers : AbstractMap(), Map by mapOf( "at" to MiraiCodeParser(Regex("""(\d*)""")) { (target) -> At(target.toLong()) }, diff --git a/mirai-core-api/src/commonMain/kotlin/message/data/Deprecated.kt b/mirai-core-api/src/commonMain/kotlin/message/data/Deprecated.kt index 55b50016d..5037aa54b 100644 --- a/mirai-core-api/src/commonMain/kotlin/message/data/Deprecated.kt +++ b/mirai-core-api/src/commonMain/kotlin/message/data/Deprecated.kt @@ -65,7 +65,8 @@ constructor( public val kind: RichMessageKind, ) : MessageMetadata, ConstrainSingle { @Suppress("DEPRECATION_ERROR") - override val key: Key get() = Key + override val key: Key + get() = Key override fun toString(): String { val resourceId = resourceId diff --git a/mirai-core-api/src/commonMain/kotlin/message/data/MessageOrigin.kt b/mirai-core-api/src/commonMain/kotlin/message/data/MessageOrigin.kt index a7f75b2fa..cc0d450b0 100644 --- a/mirai-core-api/src/commonMain/kotlin/message/data/MessageOrigin.kt +++ b/mirai-core-api/src/commonMain/kotlin/message/data/MessageOrigin.kt @@ -39,7 +39,8 @@ import net.mamoe.mirai.utils.safeCast @Serializable @SerialName(MessageOrigin.SERIAL_NAME) @MiraiExperimentalApi -public class MessageOrigin( // [2.3, 2.6-M1) 类名为 RichMessageOrigin +public class MessageOrigin( + // [2.3, 2.6-M1) 类名为 RichMessageOrigin /** * 原 [SingleMessage]. */ diff --git a/mirai-core-api/src/commonMain/kotlin/message/data/MusicShare.kt b/mirai-core-api/src/commonMain/kotlin/message/data/MusicShare.kt index 3040ff399..12d3776df 100644 --- a/mirai-core-api/src/commonMain/kotlin/message/data/MusicShare.kt +++ b/mirai-core-api/src/commonMain/kotlin/message/data/MusicShare.kt @@ -177,6 +177,7 @@ public enum class MusicKind constructor( "cmccwm.mobilemusic", "6cdc72a439cef99a3418d2a78aa28c73" ), + /** * @since 2.7 */ @@ -187,6 +188,7 @@ public enum class MusicKind constructor( "com.kugou.android", "fe4a24d80fcf253a00676a808f62c2c6" ), + /** * @since 2.7 */ diff --git a/mirai-core-api/src/commonMain/kotlin/message/data/UnsupportedMessage.kt b/mirai-core-api/src/commonMain/kotlin/message/data/UnsupportedMessage.kt index 69e3bb606..8db9647bd 100644 --- a/mirai-core-api/src/commonMain/kotlin/message/data/UnsupportedMessage.kt +++ b/mirai-core-api/src/commonMain/kotlin/message/data/UnsupportedMessage.kt @@ -33,7 +33,8 @@ import net.mamoe.mirai.utils.toUHexString @SerialName(UnsupportedMessage.SERIAL_NAME) @Serializable(UnsupportedMessage.Serializer::class) public interface UnsupportedMessage : MessageContent { - override fun contentToString(): String = "[不支持的消息#${struct.contentHashCode()}]" // to produce 'stable' and reliable text + override fun contentToString(): String = + "[不支持的消息#${struct.contentHashCode()}]" // to produce 'stable' and reliable text /** * 原生消息数据 diff --git a/mirai-core-api/src/commonMain/kotlin/utils/ExternalResource.kt b/mirai-core-api/src/commonMain/kotlin/utils/ExternalResource.kt index 51eff0d6c..051feb6c2 100644 --- a/mirai-core-api/src/commonMain/kotlin/utils/ExternalResource.kt +++ b/mirai-core-api/src/commonMain/kotlin/utils/ExternalResource.kt @@ -151,7 +151,7 @@ public interface ExternalResource : Closeable { @JvmName("create") public fun RandomAccessFile.toExternalResource( formatName: String? = null, - closeOriginalFileOnClose: Boolean = true + closeOriginalFileOnClose: Boolean = true, ): ExternalResource = ExternalResourceImplByFile(this, formatName, closeOriginalFileOnClose) @@ -212,7 +212,7 @@ public interface ExternalResource : Closeable { @JvmOverloads public suspend fun InputStream.sendAsImageTo( contact: C, - formatName: String? = null + formatName: String? = null, ): MessageReceipt = runBIO { // toExternalResource throws IOException however we're in BIO context so not propagating IOException to sendAsImageTo @@ -303,7 +303,7 @@ public interface ExternalResource : Closeable { public suspend fun File.uploadTo( contact: FileSupported, path: String, - callback: RemoteFile.ProgressionCallback? = null + callback: RemoteFile.ProgressionCallback? = null, ): FileMessage = toExternalResource().use { contact.uploadFile(path, it, callback) } /** @@ -337,7 +337,7 @@ public interface ExternalResource : Closeable { public suspend fun ExternalResource.uploadAsFile( contact: FileSupported, path: String, - callback: RemoteFile.ProgressionCallback? = null + callback: RemoteFile.ProgressionCallback? = null, ): FileMessage = contact.uploadFile(path, this, callback) /** @@ -356,7 +356,7 @@ public interface ExternalResource : Closeable { public suspend fun File.sendTo( contact: C, path: String, - callback: RemoteFile.ProgressionCallback? = null + callback: RemoteFile.ProgressionCallback? = null, ): MessageReceipt = toExternalResource().use { contact.sendFile(path, it, callback) } /** @@ -376,7 +376,7 @@ public interface ExternalResource : Closeable { public suspend fun ExternalResource.sendAsFileTo( contact: C, path: String, - callback: RemoteFile.ProgressionCallback? = null + callback: RemoteFile.ProgressionCallback? = null, ): MessageReceipt = contact.sendFile(path, this, callback) /** diff --git a/mirai-core-api/src/commonMain/kotlin/utils/RemoteFile.kt b/mirai-core-api/src/commonMain/kotlin/utils/RemoteFile.kt index 498c03a2f..7c628d216 100644 --- a/mirai-core-api/src/commonMain/kotlin/utils/RemoteFile.kt +++ b/mirai-core-api/src/commonMain/kotlin/utils/RemoteFile.kt @@ -450,7 +450,7 @@ public interface RemoteFile { ) // deprecated since 2.7-M1 public suspend fun upload( resource: ExternalResource, - callback: ProgressionCallback? = null + callback: ProgressionCallback? = null, ): FileMessage /** @@ -477,7 +477,7 @@ public interface RemoteFile { ) // deprecated since 2.7-M1 public suspend fun upload( file: File, - callback: ProgressionCallback? = null + callback: ProgressionCallback? = null, ): FileMessage = file.toExternalResource().use { upload(it, callback) } /** @@ -575,7 +575,7 @@ public interface RemoteFile { public suspend fun FileSupported.uploadFile( path: String, resource: ExternalResource, - callback: ProgressionCallback? = null + callback: ProgressionCallback? = null, ): FileMessage = @Suppress("DEPRECATION") this.filesRoot.resolve(path).upload(resource, callback) /** @@ -599,7 +599,7 @@ public interface RemoteFile { public suspend fun FileSupported.uploadFile( path: String, file: File, - callback: ProgressionCallback? = null + callback: ProgressionCallback? = null, ): FileMessage = @Suppress("DEPRECATION") this.filesRoot.resolve(path).upload(file, callback) /** @@ -612,7 +612,7 @@ public interface RemoteFile { public suspend fun C.sendFile( path: String, resource: ExternalResource, - callback: ProgressionCallback? = null + callback: ProgressionCallback? = null, ): MessageReceipt = @Suppress("DEPRECATION") this.filesRoot.resolve(path).upload(resource, callback).sendTo(this) @@ -626,7 +626,7 @@ public interface RemoteFile { public suspend fun C.sendFile( path: String, file: File, - callback: ProgressionCallback? = null + callback: ProgressionCallback? = null, ): MessageReceipt = @Suppress("DEPRECATION") this.filesRoot.resolve(path).upload(file, callback).sendTo(this) diff --git a/mirai-core-api/src/jvmTest/kotlin/event/EventChannelTest.kt b/mirai-core-api/src/jvmTest/kotlin/event/EventChannelTest.kt index e542540b6..84db0ab17 100644 --- a/mirai-core-api/src/jvmTest/kotlin/event/EventChannelTest.kt +++ b/mirai-core-api/src/jvmTest/kotlin/event/EventChannelTest.kt @@ -185,7 +185,7 @@ internal class EventChannelTest : AbstractEventTest() { val messageEventChannel = a.filterIsInstance() // group.asChannel() - val listener: Listener = messageEventChannel.subscribeAlways() { + val listener: Listener = messageEventChannel.subscribeAlways { } diff --git a/mirai-core-api/src/jvmTest/kotlin/event/EventTests.kt b/mirai-core-api/src/jvmTest/kotlin/event/EventTests.kt index 53dc73894..0f7d29eb5 100644 --- a/mirai-core-api/src/jvmTest/kotlin/event/EventTests.kt +++ b/mirai-core-api/src/jvmTest/kotlin/event/EventTests.kt @@ -187,7 +187,7 @@ internal class EventTests : AbstractEventTest() { } } - open class PriorityTestEvent : AbstractEvent() {} + open class PriorityTestEvent : AbstractEvent() fun singleThreaded(step: StepUtil, invoke: suspend EventChannel.() -> Unit) { // runBlocking 会完全堵死, 没法退出 diff --git a/mirai-core-utils/src/commonMain/kotlin/CoroutineUtils.kt b/mirai-core-utils/src/commonMain/kotlin/CoroutineUtils.kt index 2db1e6b6c..ed7133b7d 100644 --- a/mirai-core-utils/src/commonMain/kotlin/CoroutineUtils.kt +++ b/mirai-core-utils/src/commonMain/kotlin/CoroutineUtils.kt @@ -26,21 +26,21 @@ import kotlin.coroutines.EmptyCoroutineContext ) @kotlin.internal.LowPriorityInOverloadResolution public suspend inline fun runBIO( - noinline block: suspend CoroutineScope.() -> R + noinline block: suspend CoroutineScope.() -> R, ): R = withContext(Dispatchers.IO, block) public suspend inline fun runBIO( - noinline block: () -> R + noinline block: () -> R, ): R = runInterruptible(context = Dispatchers.IO, block = block) public suspend inline fun T.runBIO( - crossinline block: T.() -> R + crossinline block: T.() -> R, ): R = runInterruptible(context = Dispatchers.IO, block = { block() }) public inline fun CoroutineScope.launchWithPermit( semaphore: Semaphore, coroutineContext: CoroutineContext = EmptyCoroutineContext, - crossinline block: suspend () -> Unit + crossinline block: suspend () -> Unit, ): Job { return launch(coroutineContext) { semaphore.withPermit { block() } @@ -74,28 +74,28 @@ public fun CoroutineContext.childScopeContext( public inline fun CoroutineContext.getOrElse( key: CoroutineContext.Key, - default: () -> U + default: () -> U, ): U = this[key] ?: default() public inline fun CoroutineContext.addIfAbsent( key: CoroutineContext.Key, - default: () -> CoroutineContext.Element + default: () -> CoroutineContext.Element, ): CoroutineContext = if (this[key] == null) this + default() else this public inline fun CoroutineContext.addNameIfAbsent( - name: () -> String + name: () -> String, ): CoroutineContext = addIfAbsent(CoroutineName) { CoroutineName(name()) } public fun CoroutineContext.addNameHierarchically( - name: String + name: String, ): CoroutineContext = this + CoroutineName(this[CoroutineName]?.name?.plus('.')?.plus(name) ?: name) public fun CoroutineContext.hierarchicalName( - name: String + name: String, ): CoroutineName = CoroutineName(this[CoroutineName]?.name?.plus('.')?.plus(name) ?: name) public fun CoroutineScope.hierarchicalName( - name: String + name: String, ): CoroutineName = this.coroutineContext.hierarchicalName(name) public inline fun runUnwrapCancellationException(block: () -> R): R { @@ -163,6 +163,7 @@ public inline fun Throwable.unwrap(): Throwable { if (suppressed.isNotEmpty()) return this return this.findCause { it !is E } ?.also { it.addSuppressed(this) } - ?.fillInStackTrace() // add the unwrapped CancellationException to suppress so we loss no information ?: this -} \ No newline at end of file +} + +public val CoroutineContext.coroutineName: String get() = this[CoroutineName]?.name ?: "unnamed" \ No newline at end of file diff --git a/mirai-core-utils/src/commonMain/kotlin/Either.kt b/mirai-core-utils/src/commonMain/kotlin/Either.kt index a445ec735..28bc5209c 100644 --- a/mirai-core-utils/src/commonMain/kotlin/Either.kt +++ b/mirai-core-utils/src/commonMain/kotlin/Either.kt @@ -18,7 +18,7 @@ package net.mamoe.mirai.utils public value class Either private constructor( @PublishedApi @JvmField - internal val value: Any? + internal val value: Any?, ) { override fun toString(): String = value.toString() diff --git a/mirai-core/src/commonMain/kotlin/QQAndroidBot.kt b/mirai-core/src/commonMain/kotlin/QQAndroidBot.kt index f04f70737..d23229232 100644 --- a/mirai-core/src/commonMain/kotlin/QQAndroidBot.kt +++ b/mirai-core/src/commonMain/kotlin/QQAndroidBot.kt @@ -91,7 +91,7 @@ internal open class QQAndroidBot constructor( override fun stateChanged0( networkHandler: NetworkHandlerSupport, previous: BaseStateImpl, - new: BaseStateImpl + new: BaseStateImpl, ) { eventDispatcher.broadcastAsync(BotOnlineEvent(bot)).thenBroadcast(eventDispatcher) { if (!shouldBroadcastRelogin.compareAndSet(false, true)) { diff --git a/mirai-core/src/commonMain/kotlin/contact/AbstractMember.kt b/mirai-core/src/commonMain/kotlin/contact/AbstractMember.kt index 8f111dabc..d237454ec 100644 --- a/mirai-core/src/commonMain/kotlin/contact/AbstractMember.kt +++ b/mirai-core/src/commonMain/kotlin/contact/AbstractMember.kt @@ -21,7 +21,7 @@ import kotlin.coroutines.CoroutineContext internal abstract class AbstractMember( group: GroupImpl, coroutineContext: CoroutineContext, - memberInfo: MemberInfo + memberInfo: MemberInfo, ) : AbstractUser(group.bot, coroutineContext, memberInfo), Member { final override val group: GroupImpl by group.unsafeWeakRef() diff --git a/mirai-core/src/commonMain/kotlin/contact/AnonymousMemberImpl.kt b/mirai-core/src/commonMain/kotlin/contact/AnonymousMemberImpl.kt index 888ce81b7..5a94c4135 100644 --- a/mirai-core/src/commonMain/kotlin/contact/AnonymousMemberImpl.kt +++ b/mirai-core/src/commonMain/kotlin/contact/AnonymousMemberImpl.kt @@ -20,7 +20,7 @@ internal class AnonymousMemberImpl( group: GroupImpl, coroutineContext: CoroutineContext, memberInfo: MemberInfo, - override val anonymousId: String + override val anonymousId: String, ) : AnonymousMember, AbstractMember(group, coroutineContext, memberInfo) { override suspend fun mute(durationSeconds: Int) { checkBotPermissionHigherThanThis("mute") diff --git a/mirai-core/src/commonMain/kotlin/contact/FriendImpl.kt b/mirai-core/src/commonMain/kotlin/contact/FriendImpl.kt index ec968f8d3..a33fc9294 100644 --- a/mirai-core/src/commonMain/kotlin/contact/FriendImpl.kt +++ b/mirai-core/src/commonMain/kotlin/contact/FriendImpl.kt @@ -67,7 +67,7 @@ internal inline fun Friend.checkIsFriendImpl(): FriendImpl { internal class FriendImpl( bot: QQAndroidBot, coroutineContext: CoroutineContext, - internal val friendInfo: FriendInfo + internal val friendInfo: FriendInfo, ) : Friend, AbstractUser(bot, coroutineContext, friendInfo) { @Suppress("unused") // bug val lastMessageSequence: AtomicInt = atomic(-1) diff --git a/mirai-core/src/commonMain/kotlin/contact/GroupImpl.kt b/mirai-core/src/commonMain/kotlin/contact/GroupImpl.kt index d71e311bc..7efbe492e 100644 --- a/mirai-core/src/commonMain/kotlin/contact/GroupImpl.kt +++ b/mirai-core/src/commonMain/kotlin/contact/GroupImpl.kt @@ -16,7 +16,10 @@ import kotlinx.coroutines.flow.* import net.mamoe.mirai.LowLevelApi import net.mamoe.mirai.Mirai import net.mamoe.mirai.contact.* -import net.mamoe.mirai.data.* +import net.mamoe.mirai.data.GroupInfo +import net.mamoe.mirai.data.MemberInfo +import net.mamoe.mirai.data.ReceiveAnnouncement +import net.mamoe.mirai.data.covertToAnnouncement import net.mamoe.mirai.event.broadcast import net.mamoe.mirai.event.events.* import net.mamoe.mirai.internal.QQAndroidBot @@ -64,7 +67,7 @@ internal class GroupImpl( coroutineContext: CoroutineContext, override val id: Long, groupInfo: GroupInfo, - members: Sequence + members: Sequence, ) : Group, AbstractContact(bot, coroutineContext) { companion object diff --git a/mirai-core/src/commonMain/kotlin/contact/GroupSendMessageImpl.kt b/mirai-core/src/commonMain/kotlin/contact/GroupSendMessageImpl.kt index 0e0843c24..16ce96e8a 100644 --- a/mirai-core/src/commonMain/kotlin/contact/GroupSendMessageImpl.kt +++ b/mirai-core/src/commonMain/kotlin/contact/GroupSendMessageImpl.kt @@ -24,7 +24,7 @@ import net.mamoe.mirai.message.data.toMessageChain */ internal suspend fun C.broadcastMessagePreSendEvent( message: Message, - eventConstructor: (C, Message) -> MessagePreSendEvent + eventConstructor: (C, Message) -> MessagePreSendEvent, ): MessageChain { return kotlin.runCatching { eventConstructor(this, message).broadcast() diff --git a/mirai-core/src/commonMain/kotlin/contact/GroupSettingsImpl.kt b/mirai-core/src/commonMain/kotlin/contact/GroupSettingsImpl.kt index aca57a747..5eac1e7f9 100644 --- a/mirai-core/src/commonMain/kotlin/contact/GroupSettingsImpl.kt +++ b/mirai-core/src/commonMain/kotlin/contact/GroupSettingsImpl.kt @@ -35,7 +35,7 @@ internal class GroupSettingsImpl( getter: () -> T, setter: (T) -> Unit, crossinline packetConstructor: (client: QQAndroidClient, groupCode: Long, newValue: T) -> OutgoingPacket, - crossinline eventConstructor: (old: T) -> Event + crossinline eventConstructor: (old: T) -> Event, ) { checkBotPermission(MemberPermission.ADMINISTRATOR) val oldValue = getter() diff --git a/mirai-core/src/commonMain/kotlin/contact/NormalMemberImpl.kt b/mirai-core/src/commonMain/kotlin/contact/NormalMemberImpl.kt index 8faaf3705..f2742eb17 100644 --- a/mirai-core/src/commonMain/kotlin/contact/NormalMemberImpl.kt +++ b/mirai-core/src/commonMain/kotlin/contact/NormalMemberImpl.kt @@ -36,7 +36,7 @@ import kotlin.coroutines.CoroutineContext internal class NormalMemberImpl constructor( group: GroupImpl, coroutineContext: CoroutineContext, - memberInfo: MemberInfo + memberInfo: MemberInfo, ) : NormalMember, AbstractMember(group, coroutineContext, memberInfo) { @Suppress("unused") // false positive diff --git a/mirai-core/src/commonMain/kotlin/contact/SendMessageHandler.kt b/mirai-core/src/commonMain/kotlin/contact/SendMessageHandler.kt index 3e4c3c0ef..5cfb40ecc 100644 --- a/mirai-core/src/commonMain/kotlin/contact/SendMessageHandler.kt +++ b/mirai-core/src/commonMain/kotlin/contact/SendMessageHandler.kt @@ -168,12 +168,12 @@ internal abstract class SendMessageHandler { source = CompletableDeferred(constructSourceForSpecialMessage(finalMessage, 3116)) } -// is CommonOidbResponse<*> -> { -// when (resp.toResult("send message").getOrThrow()) { -// is Oidb0x6d9.FeedsRspBody -> { -// } -// } -// } + // is CommonOidbResponse<*> -> { + // when (resp.toResult("send message").getOrThrow()) { + // is Oidb0x6d9.FeedsRspBody -> { + // } + // } + // } } } @@ -196,7 +196,7 @@ internal abstract class SendMessageHandler { client: QQAndroidClient, message: MessageChain, fragmented: Boolean, - sourceCallback: (Deferred) -> Unit + sourceCallback: (Deferred) -> Unit, ): List { message.takeSingleContent()?.let { musicShare -> return listOf( @@ -230,7 +230,7 @@ internal abstract class SendMessageHandler { ): OnlineMessageSource.Outgoing open suspend fun uploadLongMessageHighway( - chain: MessageChain + chain: MessageChain, ): String = with(contact) { return MiraiImpl.uploadMessageHighway( bot, this@SendMessageHandler, @@ -263,7 +263,7 @@ internal abstract class SendMessageHandler { */ internal suspend fun SendMessageHandler.transformSpecialMessages(message: Message): MessageChain { suspend fun processForwardMessage( - forward: ForwardMessage + forward: ForwardMessage, ): ForwardMessageInternal { if (!(message is MessageChain && message.contains(IgnoreLengthCheck))) { check(forward.nodeList.size <= 200) { @@ -336,7 +336,7 @@ internal sealed class UserSendMessageHandler( override suspend fun constructSourceForSpecialMessage( finalMessage: MessageChain, - fromAppId: Int + fromAppId: Int, ): OnlineMessageSource.Outgoing { throw UnsupportedOperationException("Sending MusicShare or FileMessage to User is not yet supported") } @@ -386,7 +386,7 @@ internal class GroupSendMessageHandler( override suspend fun constructSourceForSpecialMessage( finalMessage: MessageChain, - fromAppId: Int + fromAppId: Int, ): OnlineMessageSource.Outgoing { val receipt: OnlinePushPbPushGroupMsg.SendGroupMessageReceipt = diff --git a/mirai-core/src/commonMain/kotlin/contact/StrangerImpl.kt b/mirai-core/src/commonMain/kotlin/contact/StrangerImpl.kt index c2e150036..3c14f304f 100644 --- a/mirai-core/src/commonMain/kotlin/contact/StrangerImpl.kt +++ b/mirai-core/src/commonMain/kotlin/contact/StrangerImpl.kt @@ -20,7 +20,9 @@ package net.mamoe.mirai.internal.contact import kotlinx.atomicfu.AtomicInt import kotlinx.atomicfu.atomic import net.mamoe.mirai.LowLevelApi -import net.mamoe.mirai.contact.* +import net.mamoe.mirai.contact.Stranger +import net.mamoe.mirai.contact.User +import net.mamoe.mirai.contact.asFriendOrNull import net.mamoe.mirai.data.StrangerInfo import net.mamoe.mirai.event.events.StrangerMessagePostSendEvent import net.mamoe.mirai.event.events.StrangerMessagePreSendEvent @@ -47,7 +49,7 @@ internal inline fun Stranger.checkIsImpl(): StrangerImpl { internal class StrangerImpl( bot: QQAndroidBot, coroutineContext: CoroutineContext, - internal val strangerInfo: StrangerInfo + internal val strangerInfo: StrangerInfo, ) : Stranger, AbstractUser(bot, coroutineContext, strangerInfo) { @Suppress("unused") // bug val lastMessageSequence: AtomicInt = atomic(-1) diff --git a/mirai-core/src/commonMain/kotlin/contact/info/MemberInfoImpl.kt b/mirai-core/src/commonMain/kotlin/contact/info/MemberInfoImpl.kt index 809b37d02..4b01d3454 100644 --- a/mirai-core/src/commonMain/kotlin/contact/info/MemberInfoImpl.kt +++ b/mirai-core/src/commonMain/kotlin/contact/info/MemberInfoImpl.kt @@ -28,12 +28,12 @@ internal data class MemberInfoImpl( override val anonymousId: String?, override val joinTimestamp: Int = currentTimeSeconds().toInt(), override var lastSpeakTimestamp: Int = 0, - override val isOfficialBot: Boolean = false + override val isOfficialBot: Boolean = false, ) : MemberInfo { constructor( client: QQAndroidClient, jceInfo: StTroopMemberInfo, - groupOwnerId: Long + groupOwnerId: Long, ) : this( uin = jceInfo.memberUin, nick = jceInfo.nick, diff --git a/mirai-core/src/commonMain/kotlin/contact/info/StrangerInfoImpl.kt b/mirai-core/src/commonMain/kotlin/contact/info/StrangerInfoImpl.kt index 5a3aef420..6d55d00e1 100644 --- a/mirai-core/src/commonMain/kotlin/contact/info/StrangerInfoImpl.kt +++ b/mirai-core/src/commonMain/kotlin/contact/info/StrangerInfoImpl.kt @@ -19,5 +19,5 @@ internal class StrangerInfoImpl( override val uin: Long, override val nick: String, override val fromGroup: Long = 0, - override val remark: String = "" + override val remark: String = "", ) : StrangerInfo \ No newline at end of file diff --git a/mirai-core/src/commonMain/kotlin/contact/util.kt b/mirai-core/src/commonMain/kotlin/contact/util.kt index c1481d890..5b38a5309 100644 --- a/mirai-core/src/commonMain/kotlin/contact/util.kt +++ b/mirai-core/src/commonMain/kotlin/contact/util.kt @@ -13,10 +13,8 @@ package net.mamoe.mirai.internal.contact import net.mamoe.mirai.Bot import net.mamoe.mirai.contact.* -import net.mamoe.mirai.event.events.* import net.mamoe.mirai.internal.message.LongMessageInternal import net.mamoe.mirai.internal.utils.estimateLength -import net.mamoe.mirai.message.* import net.mamoe.mirai.message.data.* import net.mamoe.mirai.utils.cast import net.mamoe.mirai.utils.castOrNull @@ -92,11 +90,13 @@ internal fun net.mamoe.mirai.event.events.MessageEvent.logMessageReceived() { renderGroupTempMessage(group, senderName, sender, message) is net.mamoe.mirai.event.events.StrangerMessageEvent, - is net.mamoe.mirai.event.events.StrangerMessageSyncEvent -> + is net.mamoe.mirai.event.events.StrangerMessageSyncEvent, + -> renderStrangerMessage(senderName, sender, message) is net.mamoe.mirai.event.events.FriendMessageEvent, - is net.mamoe.mirai.event.events.FriendMessageSyncEvent -> + is net.mamoe.mirai.event.events.FriendMessageSyncEvent, + -> renderFriendMessage(sender, message) is net.mamoe.mirai.event.events.OtherClientMessageEvent -> diff --git a/mirai-core/src/commonMain/kotlin/message/ReceiveMessageHandler.kt b/mirai-core/src/commonMain/kotlin/message/ReceiveMessageHandler.kt index 3ee2d80c9..088f485a9 100644 --- a/mirai-core/src/commonMain/kotlin/message/ReceiveMessageHandler.kt +++ b/mirai-core/src/commonMain/kotlin/message/ReceiveMessageHandler.kt @@ -23,7 +23,10 @@ import net.mamoe.mirai.internal.network.protocol.data.proto.* import net.mamoe.mirai.internal.utils.io.serialization.loadAs import net.mamoe.mirai.internal.utils.io.serialization.readProtoBuf import net.mamoe.mirai.message.data.* -import net.mamoe.mirai.utils.* +import net.mamoe.mirai.utils.encodeToString +import net.mamoe.mirai.utils.read +import net.mamoe.mirai.utils.toUHexString +import net.mamoe.mirai.utils.unzip /** * 只在手动构造 [OfflineMessageSource] 时调用 @@ -72,7 +75,7 @@ private fun List.toMessageChain( bot: Bot, groupIdOrZero: Long, onlineSource: Boolean?, - messageSourceKind: MessageSourceKind + messageSourceKind: MessageSourceKind, ): MessageChain { val messageList = this @@ -125,9 +128,9 @@ internal object ReceiveMessageTransformer { groupIdOrZero: Long, messageSourceKind: MessageSourceKind, bot: Bot, - builder: MessageChainBuilder + builder: MessageChainBuilder, ) { -// ProtoBuf.encodeToHexString(elements).soutv("join") + // ProtoBuf.encodeToHexString(elements).soutv("join") // (this._miraiContentToString().soutv()) for (element in elements) { transformElement(element, groupIdOrZero, messageSourceKind, bot, builder) @@ -142,7 +145,7 @@ internal object ReceiveMessageTransformer { groupIdOrZero: Long, messageSourceKind: MessageSourceKind, bot: Bot, - builder: MessageChainBuilder + builder: MessageChainBuilder, ) { when { element.srcMsg != null -> decodeSrcMsg(element.srcMsg, builder, bot, messageSourceKind, groupIdOrZero) @@ -290,7 +293,7 @@ internal object ReceiveMessageTransformer { list: MessageChainBuilder, bot: Bot, messageSourceKind: MessageSourceKind, - groupIdOrZero: Long + groupIdOrZero: Long, ) { list.add(QuoteReply(OfflineMessageSourceImplData(srcMsg, bot, messageSourceKind, groupIdOrZero))) } @@ -309,7 +312,7 @@ internal object ReceiveMessageTransformer { private fun decodeLightApp( lightApp: ImMsgBody.LightAppElem, - list: MessageChainBuilder + list: MessageChainBuilder, ) { val content = runWithBugReport("解析 lightApp", { "resId=" + lightApp.msgResid + "data=" + lightApp.data.toUHexString() }) { @@ -325,7 +328,7 @@ internal object ReceiveMessageTransformer { private fun decodeCustomElem( customElem: ImMsgBody.CustomElem, - list: MessageChainBuilder + list: MessageChainBuilder, ) { customElem.data.read { kotlin.runCatching { @@ -359,7 +362,7 @@ internal object ReceiveMessageTransformer { private fun decodeTransElem( transElement: ImMsgBody.TransElem, - list: MessageChainBuilder + list: MessageChainBuilder, ) { // file // type=24 @@ -367,14 +370,14 @@ internal object ReceiveMessageTransformer { 24 -> transElement.elemValue.read { // group file feed // 01 00 77 08 06 12 0A 61 61 61 61 61 61 2E 74 78 74 1A 06 31 35 42 79 74 65 3A 5F 12 5D 08 66 12 25 2F 64 37 34 62 62 66 33 61 2D 37 62 32 35 2D 31 31 65 62 2D 38 34 66 38 2D 35 34 35 32 30 30 37 62 35 64 39 66 18 0F 22 0A 61 61 61 61 61 61 2E 74 78 74 28 00 3A 00 42 20 61 33 32 35 66 36 33 34 33 30 65 37 61 30 31 31 66 37 64 30 38 37 66 63 33 32 34 37 35 34 39 63 -// fun getFileRsrvAttr(file: ObjMsg.MsgContentInfo.MsgFile): HummerResv21.ResvAttr? { -// if (file.ext.isEmpty()) return null -// val element = kotlin.runCatching { -// jsonForFileDecode.parseToJsonElement(file.ext) as? JsonObject -// }.getOrNull() ?: return null -// val extInfo = element["ExtInfo"]?.toString()?.decodeBase64() ?: return null -// return extInfo.loadAs(HummerResv21.ResvAttr.serializer()) -// } + // fun getFileRsrvAttr(file: ObjMsg.MsgContentInfo.MsgFile): HummerResv21.ResvAttr? { + // if (file.ext.isEmpty()) return null + // val element = kotlin.runCatching { + // jsonForFileDecode.parseToJsonElement(file.ext) as? JsonObject + // }.getOrNull() ?: return null + // val extInfo = element["ExtInfo"]?.toString()?.decodeBase64() ?: return null + // return extInfo.loadAs(HummerResv21.ResvAttr.serializer()) + // } val var7 = readByte() if (var7 == 1.toByte()) { @@ -383,8 +386,8 @@ internal object ReceiveMessageTransformer { // proto.msgType=6 val file = proto.msgContentInfo.firstOrNull()?.msgFile ?: continue // officially get(0) only. -// val attr = getFileRsrvAttr(file) ?: continue -// val info = attr.forwardExtFileInfo ?: continue + // val attr = getFileRsrvAttr(file) ?: continue + // val info = attr.forwardExtFileInfo ?: continue list.add( FileMessageImpl( @@ -408,7 +411,7 @@ internal object ReceiveMessageTransformer { private fun decodeCommonElem( commonElem: ImMsgBody.CommonElem, - list: MessageChainBuilder + list: MessageChainBuilder, ) { when (commonElem.serviceType) { 23 -> { @@ -449,7 +452,7 @@ internal object ReceiveMessageTransformer { private fun decodeRichMessage( richMsg: ImMsgBody.RichMsg, - builder: MessageChainBuilder + builder: MessageChainBuilder, ) { val content = runWithBugReport("解析 richMsg", { richMsg.template1.toUHexString() }) { when (richMsg.template1[0].toInt()) { diff --git a/mirai-core/src/commonMain/kotlin/message/RefinableMessage.kt b/mirai-core/src/commonMain/kotlin/message/RefinableMessage.kt index 5851f665f..2f4613f0a 100644 --- a/mirai-core/src/commonMain/kotlin/message/RefinableMessage.kt +++ b/mirai-core/src/commonMain/kotlin/message/RefinableMessage.kt @@ -45,7 +45,7 @@ internal interface RefinableMessage : SingleMessage { internal sealed class MessageRefiner { protected inline fun MessageChain.refineImpl( bot: Bot, - refineAction: (message: RefinableMessage) -> Message? + refineAction: (message: RefinableMessage) -> Message?, ): MessageChain { val convertLineSeparator = bot.configuration.convertLineSeparator @@ -84,7 +84,7 @@ internal sealed class MessageRefiner { @Suppress("unused") internal class RefineContextKey( - val name: String? + val name: String?, ) { override fun toString(): String { return buildString { @@ -121,7 +121,7 @@ internal object EmptyRefineContext : RefineContext { @Suppress("UNCHECKED_CAST") internal class SimpleRefineContext( - private val delegate: MutableMap, Any> = mutableMapOf() + private val delegate: MutableMap, Any> = mutableMapOf(), ) : MutableRefineContext { override fun contains(key: RefineContextKey<*>): Boolean = delegate.containsKey(key) diff --git a/mirai-core/src/commonMain/kotlin/message/UnsupportedMessageImpl.kt b/mirai-core/src/commonMain/kotlin/message/UnsupportedMessageImpl.kt index db8d03dbe..2f6d31356 100644 --- a/mirai-core/src/commonMain/kotlin/message/UnsupportedMessageImpl.kt +++ b/mirai-core/src/commonMain/kotlin/message/UnsupportedMessageImpl.kt @@ -25,7 +25,7 @@ import net.mamoe.mirai.utils.copy @SerialName(UnsupportedMessage.SERIAL_NAME) @Serializable(UnsupportedMessageImpl.Serializer::class) internal data class UnsupportedMessageImpl( - val structElem: ImMsgBody.Elem + val structElem: ImMsgBody.Elem, ) : UnsupportedMessage { override val struct: ByteArray by lazy { structElem.toByteArray(ImMsgBody.Elem.serializer()) } override fun toString(): String = content diff --git a/mirai-core/src/commonMain/kotlin/message/contextualBugReportException.kt b/mirai-core/src/commonMain/kotlin/message/contextualBugReportException.kt index 07ec8d051..910a87586 100644 --- a/mirai-core/src/commonMain/kotlin/message/contextualBugReportException.kt +++ b/mirai-core/src/commonMain/kotlin/message/contextualBugReportException.kt @@ -18,7 +18,7 @@ internal fun contextualBugReportException( context: String, forDebug: String, e: Throwable? = null, - additional: String = "" + additional: String = "", ): IllegalStateException { return IllegalStateException( "在 $context 时遇到了意料之中的问题. 请完整复制此日志提交给 mirai: https://github.com/mamoe/mirai/issues/new $additional 调试信息: $forDebug", diff --git a/mirai-core/src/commonMain/kotlin/message/imagesImpl.kt b/mirai-core/src/commonMain/kotlin/message/imagesImpl.kt index e23b1e7e1..8a8fc7d29 100644 --- a/mirai-core/src/commonMain/kotlin/message/imagesImpl.kt +++ b/mirai-core/src/commonMain/kotlin/message/imagesImpl.kt @@ -30,7 +30,7 @@ import net.mamoe.mirai.utils.ExternalResource.Companion.DEFAULT_FORMAT_NAME @Serializable(with = OnlineGroupImageImpl.Serializer::class) internal class OnlineGroupImageImpl( - internal val delegate: ImMsgBody.CustomFace + internal val delegate: ImMsgBody.CustomFace, ) : OnlineGroupImage() { object Serializer : Image.FallbackSerializer("OnlineGroupImage") @@ -59,7 +59,7 @@ internal class OnlineGroupImageImpl( @Serializable(with = OnlineFriendImageImpl.Serializer::class) internal class OnlineFriendImageImpl( - internal val delegate: ImMsgBody.NotOnlineImage + internal val delegate: ImMsgBody.NotOnlineImage, ) : @Suppress("DEPRECATION") OnlineFriendImage() { object Serializer : Image.FallbackSerializer("OnlineFriendImage") @@ -182,8 +182,8 @@ internal fun OfflineGroupImage.toJceData(): ImMsgBody.CustomFace { //_400Url = "/gchatpic_new/000000000/1041235568-2195821338-01E9451B70EDEAE3B37C101F1EEBF5B5/400?term=2", //_400Width = 351, oldData = oldData, -// pbReserve = "08 00 10 00 32 00 50 00 78 08".autoHexToBytes(), -// useful = 1, + // pbReserve = "08 00 10 00 32 00 50 00 78 08".autoHexToBytes(), + // useful = 1, // pbReserve = CustomFaceExtPb.ResvAttr().toByteArray(CustomFaceExtPb.ResvAttr.serializer()) ) } @@ -236,7 +236,7 @@ internal interface OfflineImage : Image */ @Serializable(with = OfflineGroupImage.Serializer::class) internal data class OfflineGroupImage( - override val imageId: String + override val imageId: String, ) : GroupImage(), OfflineImage, DeferredOriginUrlAware { @Transient internal var fileId: Int? = null @@ -266,7 +266,7 @@ internal abstract class OnlineGroupImage : GroupImage(), OnlineImage internal val Image.friendImageId: String get() { -// /1234567890-3666252994-EFF4427CE3D27DB6B1D9A8AB72E7A29C + // /1234567890-3666252994-EFF4427CE3D27DB6B1D9A8AB72E7A29C return "/000000000-000000000-${md5.toUHexString("")}" } @@ -277,7 +277,7 @@ internal val Image.friendImageId: String */ @Serializable(with = OfflineFriendImage.Serializer::class) internal data class OfflineFriendImage( - override val imageId: String + override val imageId: String, ) : FriendImage(), OfflineImage, DeferredOriginUrlAware { object Serializer : Image.FallbackSerializer("OfflineFriendImage") diff --git a/mirai-core/src/commonMain/kotlin/message/incomingSourceImpl.kt b/mirai-core/src/commonMain/kotlin/message/incomingSourceImpl.kt index fa3e89105..9d452affc 100644 --- a/mirai-core/src/commonMain/kotlin/message/incomingSourceImpl.kt +++ b/mirai-core/src/commonMain/kotlin/message/incomingSourceImpl.kt @@ -36,13 +36,13 @@ import java.util.concurrent.atomic.AtomicBoolean @Serializable(OnlineMessageSourceFromFriendImpl.Serializer::class) internal class OnlineMessageSourceFromFriendImpl( override val bot: Bot, - msg: List + msg: List, ) : OnlineMessageSource.Incoming.FromFriend(), MessageSourceInternal { object Serializer : MessageSourceSerializerImpl("OnlineMessageSourceFromFriend") override val sequenceIds: IntArray = msg.mapToIntArray { it.msgHead.msgSeq } override var isRecalledOrPlanned: AtomicBoolean = AtomicBoolean(false) - override val ids: IntArray get() = sequenceIds// msg.msgBody.richText.attr!!.random + override val ids: IntArray get() = sequenceIds // msg.msgBody.richText.attr!!.random override val internalIds: IntArray = msg.mapToIntArray { it.msgBody.richText.attr?.random ?: 0 } // other client 消息的这个是0 @@ -60,13 +60,13 @@ internal class OnlineMessageSourceFromFriendImpl( @Serializable(OnlineMessageSourceFromStrangerImpl.Serializer::class) internal class OnlineMessageSourceFromStrangerImpl( override val bot: Bot, - msg: List + msg: List, ) : OnlineMessageSource.Incoming.FromStranger(), MessageSourceInternal { object Serializer : MessageSourceSerializerImpl("OnlineMessageSourceFromStranger") override val sequenceIds: IntArray = msg.mapToIntArray { it.msgHead.msgSeq } override var isRecalledOrPlanned: AtomicBoolean = AtomicBoolean(false) - override val ids: IntArray get() = sequenceIds// msg.msgBody.richText.attr!!.random + override val ids: IntArray get() = sequenceIds // msg.msgBody.richText.attr!!.random override val internalIds: IntArray = msg.mapToIntArray { it.msgBody.richText.attr?.random ?: 0 } // other client 消息的这个是0 @@ -123,14 +123,14 @@ private fun List.toJceDataPrivate(ids: IntArray): ImMsgBody.SourceM @Serializable(OnlineMessageSourceFromTempImpl.Serializer::class) internal class OnlineMessageSourceFromTempImpl( override val bot: Bot, - msg: List + msg: List, ) : OnlineMessageSource.Incoming.FromTemp(), MessageSourceInternal { object Serializer : MessageSourceSerializerImpl("OnlineMessageSourceFromTemp") override val sequenceIds: IntArray = msg.mapToIntArray { it.msgHead.msgSeq } override val internalIds: IntArray = msg.mapToIntArray { it.msgBody.richText.attr!!.random } override var isRecalledOrPlanned: AtomicBoolean = AtomicBoolean(false) - override val ids: IntArray get() = sequenceIds// + override val ids: IntArray get() = sequenceIds // override val time: Int = msg.first().msgHead.msgTime override val originalMessage: MessageChain by lazy { msg.toMessageChainNoSource(bot, groupIdOrZero = 0, MessageSourceKind.TEMP) @@ -146,7 +146,7 @@ internal class OnlineMessageSourceFromTempImpl( @Serializable(OnlineMessageSourceFromGroupImpl.Serializer::class) internal class OnlineMessageSourceFromGroupImpl( override val bot: Bot, - msg: List + msg: List, ) : OnlineMessageSource.Incoming.FromGroup(), MessageSourceInternal { object Serializer : MessageSourceSerializerImpl("OnlineMessageSourceFromGroupImpl") diff --git a/mirai-core/src/commonMain/kotlin/message/lightApp.kt b/mirai-core/src/commonMain/kotlin/message/lightApp.kt index fc0e12b2c..e3a3fcdf4 100644 --- a/mirai-core/src/commonMain/kotlin/message/lightApp.kt +++ b/mirai-core/src/commonMain/kotlin/message/lightApp.kt @@ -17,7 +17,7 @@ import net.mamoe.mirai.message.data.* import net.mamoe.mirai.utils.safeCast internal data class LightAppInternal( - override val content: String + override val content: String, ) : RichMessage, RefinableMessage { companion object Key : AbstractPolymorphicMessageKey(RichMessage, { it.safeCast() }) @@ -114,7 +114,7 @@ internal data class LightAppStruct( @SerialName("ver") val ver: String = "", @SerialName("view") - val view: String = "" + val view: String = "", ) { @Serializable data class Config( @@ -127,7 +127,7 @@ internal data class LightAppStruct( @SerialName("token") val token: String = "", @SerialName("type") - val type: String = "" + val type: String = "", ) @Serializable @@ -137,13 +137,13 @@ internal data class LightAppStruct( @SerialName("appid") val appid: Int = 0, @SerialName("uin") - val uin: Int = 0 + val uin: Int = 0, ) @Serializable data class Meta( @SerialName("music") - val music: Music? = null + val music: Music? = null, ) { @Serializable data class Music( @@ -172,7 +172,7 @@ internal data class LightAppStruct( @SerialName("tag") val tag: String = "", @SerialName("title") - val title: String = "" + val title: String = "", ) } } diff --git a/mirai-core/src/commonMain/kotlin/message/messageToElems.kt b/mirai-core/src/commonMain/kotlin/message/messageToElems.kt index 085de5ca4..3f186a185 100644 --- a/mirai-core/src/commonMain/kotlin/message/messageToElems.kt +++ b/mirai-core/src/commonMain/kotlin/message/messageToElems.kt @@ -241,7 +241,7 @@ internal fun MessageChain.toRichTextElems( is ForwardMessage, is MessageSource, // mirai metadata only - is RichMessage // already transformed above + is RichMessage, // already transformed above -> { } diff --git a/mirai-core/src/commonMain/kotlin/message/offlineSourceImpl.kt b/mirai-core/src/commonMain/kotlin/message/offlineSourceImpl.kt index 6e9f2f2b3..66b341e9a 100644 --- a/mirai-core/src/commonMain/kotlin/message/offlineSourceImpl.kt +++ b/mirai-core/src/commonMain/kotlin/message/offlineSourceImpl.kt @@ -109,7 +109,7 @@ internal class OfflineMessageSourceImplData( internal fun OfflineMessageSourceImplData( bot: Bot, delegate: List, - kind: MessageSourceKind + kind: MessageSourceKind, ): OfflineMessageSourceImplData { val head = delegate.first().msgHead return OfflineMessageSourceImplData( diff --git a/mirai-core/src/commonMain/kotlin/message/outgoingSourceImpl.kt b/mirai-core/src/commonMain/kotlin/message/outgoingSourceImpl.kt index ef5c6dcb6..c09f2b1b9 100644 --- a/mirai-core/src/commonMain/kotlin/message/outgoingSourceImpl.kt +++ b/mirai-core/src/commonMain/kotlin/message/outgoingSourceImpl.kt @@ -81,7 +81,7 @@ internal class OnlineMessageSourceToFriendImpl( override val time: Int, override val originalMessage: MessageChain, override val sender: Bot, - override val target: Friend + override val target: Friend, ) : OnlineMessageSource.Outgoing.ToFriend(), MessageSourceInternal { object Serializer : MessageSourceSerializerImpl("OnlineMessageSourceToFriend") @@ -101,12 +101,12 @@ internal class OnlineMessageSourceToStrangerImpl( override val time: Int, override val originalMessage: MessageChain, override val sender: Bot, - override val target: Stranger + override val target: Stranger, ) : OnlineMessageSource.Outgoing.ToStranger(), MessageSourceInternal { constructor( delegate: Outgoing, - target: Stranger + target: Stranger, ) : this(delegate.ids, delegate.internalIds, delegate.time, delegate.originalMessage, delegate.sender, target) object Serializer : MessageSourceSerializerImpl("OnlineMessageSourceToStranger") @@ -127,11 +127,11 @@ internal class OnlineMessageSourceToTempImpl( override val time: Int, override val originalMessage: MessageChain, override val sender: Bot, - override val target: Member + override val target: Member, ) : OnlineMessageSource.Outgoing.ToTemp(), MessageSourceInternal { constructor( delegate: Outgoing, - target: Member + target: Member, ) : this(delegate.ids, delegate.internalIds, delegate.time, delegate.originalMessage, delegate.sender, target) object Serializer : MessageSourceSerializerImpl("OnlineMessageSourceToTemp") @@ -182,10 +182,10 @@ internal class OnlineMessageSourceToGroupImpl( @OptIn(ExperimentalCoroutinesApi::class) override val sequenceIds: IntArray get() = when { - sequenceIdDeferred.isCompleted -> sequenceIdDeferred.getCompleted() ?: intArrayOf() - !sequenceIdDeferred.isActive -> intArrayOf() - else -> error("sequenceIds not yet available") - } + sequenceIdDeferred.isCompleted -> sequenceIdDeferred.getCompleted() ?: intArrayOf() + !sequenceIdDeferred.isActive -> intArrayOf() + else -> error("sequenceIds not yet available") + } suspend fun ensureSequenceIdAvailable() = kotlin.run { sequenceIdDeferred.await() } diff --git a/mirai-core/src/commonMain/kotlin/network/context/AccountSecrets.kt b/mirai-core/src/commonMain/kotlin/network/context/AccountSecrets.kt index b8077cafb..99f9461d7 100644 --- a/mirai-core/src/commonMain/kotlin/network/context/AccountSecrets.kt +++ b/mirai-core/src/commonMain/kotlin/network/context/AccountSecrets.kt @@ -88,7 +88,7 @@ internal fun AccountSecretsImpl( } internal fun AccountSecretsImpl( - device: DeviceInfo, account: BotAccount + device: DeviceInfo, account: BotAccount, ): AccountSecretsImpl { return AccountSecretsImpl( loginExtraData = CopyOnWriteArraySet(), diff --git a/mirai-core/src/commonMain/kotlin/network/context/SsoProcessorContext.kt b/mirai-core/src/commonMain/kotlin/network/context/SsoProcessorContext.kt index 274eee7d3..0d7d27202 100644 --- a/mirai-core/src/commonMain/kotlin/network/context/SsoProcessorContext.kt +++ b/mirai-core/src/commonMain/kotlin/network/context/SsoProcessorContext.kt @@ -37,7 +37,7 @@ internal interface SsoProcessorContext { } internal class SsoProcessorContextImpl( - override val bot: QQAndroidBot + override val bot: QQAndroidBot, ) : SsoProcessorContext { override val account: BotAccount get() = bot.account override val device: DeviceInfo = configuration.createDeviceInfo(bot) diff --git a/mirai-core/src/commonMain/kotlin/network/handler/NetworkHandler.kt b/mirai-core/src/commonMain/kotlin/network/handler/NetworkHandler.kt index 088a2b2d1..2535da8a6 100644 --- a/mirai-core/src/commonMain/kotlin/network/handler/NetworkHandler.kt +++ b/mirai-core/src/commonMain/kotlin/network/handler/NetworkHandler.kt @@ -161,7 +161,7 @@ internal interface NetworkHandler : CoroutineScope { * @suppress This is for compatibility with old code. Use [sendWithoutExpect] without extension receiver instead. */ suspend fun OutgoingPacket.sendWithoutExpect( - antiCollisionParam: Any? = null + antiCollisionParam: Any? = null, ) = this@NetworkHandler.sendWithoutExpect(this) /** @@ -171,7 +171,7 @@ internal interface NetworkHandler : CoroutineScope { suspend fun OutgoingPacket.sendAndExpect( timeoutMillis: Long = 5000, retry: Int = 2, - antiCollisionParam: Any? = null // signature collision + antiCollisionParam: Any? = null, // signature collision ): R = sendAndExpect(this, timeoutMillis, retry) as R /** @@ -180,7 +180,7 @@ internal interface NetworkHandler : CoroutineScope { @Suppress("UNCHECKED_CAST") suspend fun OutgoingPacketWithRespType.sendAndExpect( timeoutMillis: Long = 5000, - retry: Int = 2 + retry: Int = 2, ): R = sendAndExpect(this, timeoutMillis, retry) as R } diff --git a/mirai-core/src/commonMain/kotlin/network/handler/NetworkHandlerContext.kt b/mirai-core/src/commonMain/kotlin/network/handler/NetworkHandlerContext.kt index cfcf0cc61..3e49e4729 100644 --- a/mirai-core/src/commonMain/kotlin/network/handler/NetworkHandlerContext.kt +++ b/mirai-core/src/commonMain/kotlin/network/handler/NetworkHandlerContext.kt @@ -31,7 +31,7 @@ internal inline fun NetworkHandlerContext.mapComponents(action: (ComponentStorag internal class NetworkHandlerContextImpl( override val bot: QQAndroidBot, override val logger: MiraiLogger, - private val storage: ComponentStorage // should be the same as bot.components + private val storage: ComponentStorage, // should be the same as bot.components ) : NetworkHandlerContext, ComponentStorage by storage { override fun toString(): String { return "NetworkHandlerContextImpl(bot=${bot.id}, storage=$storage)" diff --git a/mirai-core/src/commonMain/kotlin/network/handler/selector/ExceptionInSelectorResumeException.kt b/mirai-core/src/commonMain/kotlin/network/handler/selector/ExceptionInSelectorResumeException.kt index c82cd959a..26b2d906d 100644 --- a/mirai-core/src/commonMain/kotlin/network/handler/selector/ExceptionInSelectorResumeException.kt +++ b/mirai-core/src/commonMain/kotlin/network/handler/selector/ExceptionInSelectorResumeException.kt @@ -10,5 +10,5 @@ package net.mamoe.mirai.internal.network.handler.selector internal class ExceptionInSelectorResumeException( - cause: Throwable + cause: Throwable, ) : RuntimeException(cause) \ No newline at end of file diff --git a/mirai-core/src/commonMain/kotlin/network/handler/selector/MaxAttemptsReachedException.kt b/mirai-core/src/commonMain/kotlin/network/handler/selector/MaxAttemptsReachedException.kt index 6d26a6cec..53925b341 100644 --- a/mirai-core/src/commonMain/kotlin/network/handler/selector/MaxAttemptsReachedException.kt +++ b/mirai-core/src/commonMain/kotlin/network/handler/selector/MaxAttemptsReachedException.kt @@ -10,5 +10,5 @@ package net.mamoe.mirai.internal.network.handler.selector internal data class MaxAttemptsReachedException( - override val cause: Throwable? + override val cause: Throwable?, ) : IllegalStateException("Failed to resume instance. Maximum attempts reached.") \ No newline at end of file diff --git a/mirai-core/src/commonMain/kotlin/network/handler/state/CombinedStateObserver.kt b/mirai-core/src/commonMain/kotlin/network/handler/state/CombinedStateObserver.kt index bf5149bd1..25e16feb1 100644 --- a/mirai-core/src/commonMain/kotlin/network/handler/state/CombinedStateObserver.kt +++ b/mirai-core/src/commonMain/kotlin/network/handler/state/CombinedStateObserver.kt @@ -13,12 +13,12 @@ import net.mamoe.mirai.internal.network.handler.NetworkHandler import net.mamoe.mirai.internal.network.handler.NetworkHandlerSupport internal class CombinedStateObserver( - private val list: List + private val list: List, ) : StateObserver { override fun beforeStateChanged( networkHandler: NetworkHandlerSupport, previous: NetworkHandlerSupport.BaseStateImpl, - new: NetworkHandlerSupport.BaseStateImpl + new: NetworkHandlerSupport.BaseStateImpl, ) { list.forEach { it.beforeStateChanged(networkHandler, previous, new) } } @@ -26,7 +26,7 @@ internal class CombinedStateObserver( override fun stateChanged( networkHandler: NetworkHandlerSupport, previous: NetworkHandlerSupport.BaseStateImpl, - new: NetworkHandlerSupport.BaseStateImpl + new: NetworkHandlerSupport.BaseStateImpl, ) { list.forEach { it.stateChanged(networkHandler, previous, new) } } @@ -34,7 +34,7 @@ internal class CombinedStateObserver( override fun exceptionOnCreatingNewState( networkHandler: NetworkHandlerSupport, previousState: NetworkHandlerSupport.BaseStateImpl, - exception: Throwable + exception: Throwable, ) { list.forEach { it.exceptionOnCreatingNewState(networkHandler, previousState, exception) } } @@ -46,7 +46,7 @@ internal class CombinedStateObserver( override fun afterStateResume( networkHandler: NetworkHandler, state: NetworkHandlerSupport.BaseStateImpl, - result: Result + result: Result, ) { list.forEach { it.afterStateResume(networkHandler, state, result) } } diff --git a/mirai-core/src/commonMain/kotlin/network/handler/state/ExceptionInStateObserverException.kt b/mirai-core/src/commonMain/kotlin/network/handler/state/ExceptionInStateObserverException.kt index d701d7d01..b508d4de4 100644 --- a/mirai-core/src/commonMain/kotlin/network/handler/state/ExceptionInStateObserverException.kt +++ b/mirai-core/src/commonMain/kotlin/network/handler/state/ExceptionInStateObserverException.kt @@ -10,5 +10,5 @@ package net.mamoe.mirai.internal.network.handler.state internal class ExceptionInStateObserverException( - override val cause: Throwable + override val cause: Throwable, ) : RuntimeException() \ No newline at end of file diff --git a/mirai-core/src/commonMain/kotlin/network/handler/state/JobAttachStateObserver.kt b/mirai-core/src/commonMain/kotlin/network/handler/state/JobAttachStateObserver.kt index 2856f760c..637e9c34a 100644 --- a/mirai-core/src/commonMain/kotlin/network/handler/state/JobAttachStateObserver.kt +++ b/mirai-core/src/commonMain/kotlin/network/handler/state/JobAttachStateObserver.kt @@ -31,7 +31,7 @@ internal class JobAttachStateObserver( override fun stateChanged0( networkHandler: NetworkHandlerSupport, previous: NetworkHandlerSupport.BaseStateImpl, - new: NetworkHandlerSupport.BaseStateImpl + new: NetworkHandlerSupport.BaseStateImpl, ) { new.launch(CoroutineName(name) + coroutineContext, start = CoroutineStart.UNDISPATCHED) { try { diff --git a/mirai-core/src/commonMain/kotlin/network/handler/state/LoggingStateObserver.kt b/mirai-core/src/commonMain/kotlin/network/handler/state/LoggingStateObserver.kt index 61d70070c..41ea228ce 100644 --- a/mirai-core/src/commonMain/kotlin/network/handler/state/LoggingStateObserver.kt +++ b/mirai-core/src/commonMain/kotlin/network/handler/state/LoggingStateObserver.kt @@ -17,14 +17,14 @@ import net.mamoe.mirai.utils.systemProp internal class LoggingStateObserver( val logger: MiraiLogger, - private val showStacktrace: Boolean = false + private val showStacktrace: Boolean = false, ) : StateObserver { override fun toString(): String = "LoggingStateObserver(logger=${logger.identity})" override fun beforeStateChanged( networkHandler: NetworkHandlerSupport, previous: NetworkHandlerSupport.BaseStateImpl, - new: NetworkHandlerSupport.BaseStateImpl + new: NetworkHandlerSupport.BaseStateImpl, ) { logger.debug( { "Before change: ${previous.correspondingState} -> ${new.correspondingState}" }, @@ -35,7 +35,7 @@ internal class LoggingStateObserver( override fun stateChanged( networkHandler: NetworkHandlerSupport, previous: NetworkHandlerSupport.BaseStateImpl, - new: NetworkHandlerSupport.BaseStateImpl + new: NetworkHandlerSupport.BaseStateImpl, ) { logger.debug( { "State changed: ${previous.correspondingState} -> ${new.correspondingState}" }, @@ -46,7 +46,7 @@ internal class LoggingStateObserver( override fun exceptionOnCreatingNewState( networkHandler: NetworkHandlerSupport, previousState: NetworkHandlerSupport.BaseStateImpl, - exception: Throwable + exception: Throwable, ) { logger.debug { "State changed: ${previousState.correspondingState} -> $exception" } } @@ -58,7 +58,7 @@ internal class LoggingStateObserver( override fun afterStateResume( networkHandler: NetworkHandler, state: NetworkHandlerSupport.BaseStateImpl, - result: Result + result: Result, ) { result.fold( onSuccess = { diff --git a/mirai-core/src/commonMain/kotlin/network/handler/state/SafeStateObserver.kt b/mirai-core/src/commonMain/kotlin/network/handler/state/SafeStateObserver.kt index a5fbdef58..655e0165d 100644 --- a/mirai-core/src/commonMain/kotlin/network/handler/state/SafeStateObserver.kt +++ b/mirai-core/src/commonMain/kotlin/network/handler/state/SafeStateObserver.kt @@ -34,7 +34,7 @@ internal class SafeStateObserver( override fun stateChanged( networkHandler: NetworkHandlerSupport, previous: NetworkHandlerSupport.BaseStateImpl, - new: NetworkHandlerSupport.BaseStateImpl + new: NetworkHandlerSupport.BaseStateImpl, ) { try { delegate.stateChanged(networkHandler, previous, new) @@ -49,7 +49,7 @@ internal class SafeStateObserver( override fun exceptionOnCreatingNewState( networkHandler: NetworkHandlerSupport, previousState: NetworkHandlerSupport.BaseStateImpl, - exception: Throwable + exception: Throwable, ) { try { delegate.exceptionOnCreatingNewState(networkHandler, previousState, exception) @@ -75,7 +75,7 @@ internal class SafeStateObserver( override fun afterStateResume( networkHandler: NetworkHandler, state: NetworkHandlerSupport.BaseStateImpl, - result: Result + result: Result, ) { try { delegate.afterStateResume(networkHandler, state, result) diff --git a/mirai-core/src/commonMain/kotlin/network/handler/state/StateChangedObserver.kt b/mirai-core/src/commonMain/kotlin/network/handler/state/StateChangedObserver.kt index 2fa23bdae..52ba8d1f9 100644 --- a/mirai-core/src/commonMain/kotlin/network/handler/state/StateChangedObserver.kt +++ b/mirai-core/src/commonMain/kotlin/network/handler/state/StateChangedObserver.kt @@ -16,13 +16,13 @@ import net.mamoe.mirai.internal.network.handler.NetworkHandlerSupport internal fun StateChangedObserver( name: String, to: State, - action: (new: NetworkHandlerSupport.BaseStateImpl) -> Unit + action: (new: NetworkHandlerSupport.BaseStateImpl) -> Unit, ): StateObserver { return object : StateChangedObserver(to) { override fun stateChanged0( networkHandler: NetworkHandlerSupport, previous: NetworkHandlerSupport.BaseStateImpl, - new: NetworkHandlerSupport.BaseStateImpl + new: NetworkHandlerSupport.BaseStateImpl, ) { action(new) } @@ -36,13 +36,13 @@ internal fun StateChangedObserver( name: String, from: State, to: State, - action: (new: NetworkHandlerSupport.BaseStateImpl) -> Unit + action: (new: NetworkHandlerSupport.BaseStateImpl) -> Unit, ): StateObserver { return object : StateObserver { override fun stateChanged( networkHandler: NetworkHandlerSupport, previous: NetworkHandlerSupport.BaseStateImpl, - new: NetworkHandlerSupport.BaseStateImpl + new: NetworkHandlerSupport.BaseStateImpl, ) { if (previous.correspondingState == from && new.correspondingState == to) { action(new) @@ -58,13 +58,13 @@ internal fun BeforeStateChangedObserver( name: String, from: State, to: State, - action: (new: NetworkHandlerSupport.BaseStateImpl) -> Unit + action: (new: NetworkHandlerSupport.BaseStateImpl) -> Unit, ): StateObserver { return object : StateObserver { override fun beforeStateChanged( networkHandler: NetworkHandlerSupport, previous: NetworkHandlerSupport.BaseStateImpl, - new: NetworkHandlerSupport.BaseStateImpl + new: NetworkHandlerSupport.BaseStateImpl, ) { if (previous.correspondingState == from && new.correspondingState == to) { action(new) @@ -81,13 +81,13 @@ internal abstract class StateChangedObserver( protected abstract fun stateChanged0( networkHandler: NetworkHandlerSupport, previous: NetworkHandlerSupport.BaseStateImpl, - new: NetworkHandlerSupport.BaseStateImpl + new: NetworkHandlerSupport.BaseStateImpl, ) override fun stateChanged( networkHandler: NetworkHandlerSupport, previous: NetworkHandlerSupport.BaseStateImpl, - new: NetworkHandlerSupport.BaseStateImpl + new: NetworkHandlerSupport.BaseStateImpl, ) { if (previous.correspondingState != state && new.correspondingState == state) { stateChanged0(networkHandler, previous, new) diff --git a/mirai-core/src/commonMain/kotlin/network/handler/state/StateObserver.kt b/mirai-core/src/commonMain/kotlin/network/handler/state/StateObserver.kt index 5cba5155f..10aa3b708 100644 --- a/mirai-core/src/commonMain/kotlin/network/handler/state/StateObserver.kt +++ b/mirai-core/src/commonMain/kotlin/network/handler/state/StateObserver.kt @@ -27,7 +27,7 @@ internal interface StateObserver { fun beforeStateChanged( networkHandler: NetworkHandlerSupport, previous: NetworkHandlerSupport.BaseStateImpl, - new: NetworkHandlerSupport.BaseStateImpl + new: NetworkHandlerSupport.BaseStateImpl, ) { } @@ -38,7 +38,7 @@ internal interface StateObserver { fun stateChanged( networkHandler: NetworkHandlerSupport, previous: NetworkHandlerSupport.BaseStateImpl, - new: NetworkHandlerSupport.BaseStateImpl + new: NetworkHandlerSupport.BaseStateImpl, ) { } diff --git a/mirai-core/src/commonMain/kotlin/network/highway/Highway.kt b/mirai-core/src/commonMain/kotlin/network/highway/Highway.kt index a0b4b8985..884939ca4 100644 --- a/mirai-core/src/commonMain/kotlin/network/highway/Highway.kt +++ b/mirai-core/src/commonMain/kotlin/network/highway/Highway.kt @@ -118,7 +118,7 @@ internal object Highway { } internal enum class ResourceKind( - private val display: String + private val display: String, ) { PRIVATE_IMAGE("private image"), GROUP_IMAGE("group image"), @@ -135,7 +135,7 @@ internal enum class ResourceKind( } internal enum class ChannelKind( - private val display: String + private val display: String, ) { HIGHWAY("Highway"), HTTP("Http") @@ -150,7 +150,7 @@ internal suspend inline fun tryServersUpload( resourceSize: Long, resourceKind: ResourceKind, channelKind: ChannelKind, - crossinline implOnEachServer: suspend (ip: String, port: Int) -> R + crossinline implOnEachServer: suspend (ip: String, port: Int) -> R, ) = servers.retryWithServers( (resourceSize * 1000 / 1024 / 10).coerceAtLeast(5000), onFail = { throw IllegalStateException("cannot upload $resourceKind, failed on all servers.", it) } @@ -185,7 +185,7 @@ internal suspend inline fun tryServersDownload( servers: Collection>, resourceKind: ResourceKind, channelKind: ChannelKind, - crossinline implOnEachServer: suspend (ip: String, port: Int) -> R + crossinline implOnEachServer: suspend (ip: String, port: Int) -> R, ) = servers.retryWithServers( 5000, onFail = { throw IllegalStateException("cannot download $resourceKind, failed on all servers.", it) } @@ -200,7 +200,7 @@ internal suspend inline fun tryDownload( times: Int = 1, resourceKind: ResourceKind, channelKind: ChannelKind, - crossinline implOnEachServer: suspend (ip: String, port: Int) -> R + crossinline implOnEachServer: suspend (ip: String, port: Int) -> R, ) = retryCatching(times) { tryDownloadImplEach(bot, channelKind, resourceKind, host, port, implOnEachServer) }.getOrElse { throw IllegalStateException("Cannot download $resourceKind", it) } @@ -212,7 +212,7 @@ private suspend inline fun tryDownloadImplEach( resourceKind: ResourceKind, host: String, port: Int, - crossinline implOnEachServer: suspend (ip: String, port: Int) -> R + crossinline implOnEachServer: suspend (ip: String, port: Int) -> R, ): R { bot.network.logger.verbose { "[${channelKind}] Downloading $resourceKind from ${host}:$port" @@ -237,7 +237,7 @@ private suspend inline fun tryDownloadImplEach( internal suspend fun ChunkedFlowSession.sendSequentially( socket: PlatformSocket, - respCallback: (resp: CSDataHighwayHead.RspDataHighwayHead) -> Unit = {} + respCallback: (resp: CSDataHighwayHead.RspDataHighwayHead) -> Unit = {}, ) { contract { callsInPlace(respCallback, InvocationKind.UNKNOWN) } useAll { @@ -299,7 +299,7 @@ internal interface HighwayProtocolChannel { // } internal class SynchronousHighwayProtocolChannel( - val action: suspend (ByteReadPacket) -> ByteArray + val action: suspend (ByteReadPacket) -> ByteArray, ) : HighwayProtocolChannel { @Volatile var result: ByteArray? = null diff --git a/mirai-core/src/commonMain/kotlin/network/highway/Http.kt b/mirai-core/src/commonMain/kotlin/network/highway/Http.kt index a732a0081..6a59e2d4e 100644 --- a/mirai-core/src/commonMain/kotlin/network/highway/Http.kt +++ b/mirai-core/src/commonMain/kotlin/network/highway/Http.kt @@ -46,7 +46,7 @@ internal suspend fun HttpClient.postImage( uin: Long, groupcode: Long?, imageInput: ExternalResource, - uKeyHex: String + uKeyHex: String, ): Boolean = post { url { protocol = URLProtocol.HTTP diff --git a/mirai-core/src/commonMain/kotlin/network/impl/netty/HeartbeatFailedException.kt b/mirai-core/src/commonMain/kotlin/network/impl/netty/HeartbeatFailedException.kt index 503c4f229..e1791e2bc 100644 --- a/mirai-core/src/commonMain/kotlin/network/impl/netty/HeartbeatFailedException.kt +++ b/mirai-core/src/commonMain/kotlin/network/impl/netty/HeartbeatFailedException.kt @@ -13,7 +13,7 @@ import net.mamoe.mirai.internal.network.handler.selector.NetworkException internal class HeartbeatFailedException( private val name: String, // kind of HB - override val cause: Throwable? = null + override val cause: Throwable? = null, ) : NetworkException(true) { override val message: String = "Exception in $name job" override fun toString(): String = "HeartbeatFailedException: $name, cause=$cause" diff --git a/mirai-core/src/commonMain/kotlin/network/impl/netty/NettyChannelException.kt b/mirai-core/src/commonMain/kotlin/network/impl/netty/NettyChannelException.kt index 493b5fafc..c796ed399 100644 --- a/mirai-core/src/commonMain/kotlin/network/impl/netty/NettyChannelException.kt +++ b/mirai-core/src/commonMain/kotlin/network/impl/netty/NettyChannelException.kt @@ -13,5 +13,5 @@ import net.mamoe.mirai.internal.network.handler.selector.NetworkException internal data class NettyChannelException( override val message: String? = null, - override val cause: Throwable? = null + override val cause: Throwable? = null, ) : NetworkException(true) \ No newline at end of file diff --git a/mirai-core/src/commonMain/kotlin/network/impl/netty/NettyNetworkHandler.kt b/mirai-core/src/commonMain/kotlin/network/impl/netty/NettyNetworkHandler.kt index 2c9cffc85..343afaa27 100644 --- a/mirai-core/src/commonMain/kotlin/network/impl/netty/NettyNetworkHandler.kt +++ b/mirai-core/src/commonMain/kotlin/network/impl/netty/NettyNetworkHandler.kt @@ -85,7 +85,7 @@ internal open class NettyNetworkHandler( } private inner class RawIncomingPacketCollector( - private val decodePipeline: PacketDecodePipeline + private val decodePipeline: PacketDecodePipeline, ) : SimpleChannelInboundHandler(RawIncomingPacket::class.java) { override fun channelRead0(ctx: ChannelHandlerContext, msg: RawIncomingPacket) { decodePipeline.send(msg) @@ -214,7 +214,7 @@ internal open class NettyNetworkHandler( * @see StateObserver */ protected abstract inner class NettyState( - correspondingState: State + correspondingState: State, ) : BaseStateImpl(correspondingState) { /** * @return `true` if packet has been sent, `false` if state is not ready for send. @@ -225,7 +225,7 @@ internal open class NettyNetworkHandler( protected inner class StateInitialized : NettyState(State.INITIALIZED) { override suspend fun sendPacketImpl(packet: OutgoingPacket): Boolean { -// error("Cannot send packet when connection is not set. (resumeConnection not called.)") + // error("Cannot send packet when connection is not set. (resumeConnection not called.)") return false } @@ -307,7 +307,7 @@ internal open class NettyNetworkHandler( * @see StateObserver */ protected inner class StateLoading( - private val connection: NettyChannel + private val connection: NettyChannel, ) : NettyState(State.LOADING) { init { coroutineContext.job.invokeOnCompletion { @@ -380,7 +380,7 @@ internal open class NettyNetworkHandler( } protected inner class StateClosed( - val exception: Throwable? + val exception: Throwable?, ) : NettyState(State.CLOSED) { init { close(exception) diff --git a/mirai-core/src/commonMain/kotlin/network/impl/netty/nettyUtils.kt b/mirai-core/src/commonMain/kotlin/network/impl/netty/nettyUtils.kt index acd09cdc4..fe7cbd34e 100644 --- a/mirai-core/src/commonMain/kotlin/network/impl/netty/nettyUtils.kt +++ b/mirai-core/src/commonMain/kotlin/network/impl/netty/nettyUtils.kt @@ -52,7 +52,7 @@ internal fun ByteBuf.toReadPacket(): ByteReadPacket { internal fun MiraiLogger.asCoroutineExceptionHandler( - priority: SimpleLogger.LogPriority = ERROR + priority: SimpleLogger.LogPriority = ERROR, ): CoroutineExceptionHandler { return CoroutineExceptionHandler { context, e -> call( diff --git a/mirai-core/src/commonMain/kotlin/network/keys.kt b/mirai-core/src/commonMain/kotlin/network/keys.kt index eccdc33d8..6b2d32837 100644 --- a/mirai-core/src/commonMain/kotlin/network/keys.kt +++ b/mirai-core/src/commonMain/kotlin/network/keys.kt @@ -20,7 +20,7 @@ import net.mamoe.mirai.utils.* internal class ReserveUinInfo( val imgType: ByteArray, val imgFormat: ByteArray, - val imgUrl: ByteArray + val imgUrl: ByteArray, ) { override fun toString(): String { return "ReserveUinInfo(imgType=${imgType.toUHexString()}, imgFormat=${imgFormat.toUHexString()}, imgUrl=${imgUrl.toUHexString()})" @@ -32,7 +32,7 @@ internal class WFastLoginInfo( var adUrl: String = "", var iconUrl: String = "", var profileUrl: String = "", - var userJson: String = "" + var userJson: String = "", ) { override fun toString(): String { return "WFastLoginInfo(outA1=$outA1, adUrl='$adUrl', iconUrl='$iconUrl', profileUrl='$profileUrl', userJson='$userJson')" @@ -45,7 +45,7 @@ internal class WLoginSimpleInfo( val imgType: ByteArray, val imgFormat: ByteArray, val imgUrl: ByteArray, - val mainDisplayName: ByteArray + val mainDisplayName: ByteArray, ) { override fun toString(): String { return "WLoginSimpleInfo(uin=$uin, imgType=${imgType.toUHexString()}, imgFormat=${imgFormat.toUHexString()}, imgUrl=${imgUrl.toUHexString()}, mainDisplayName=${mainDisplayName.toUHexString()})" @@ -57,7 +57,7 @@ internal class LoginExtraData( val uin: Long, val ip: ByteArray, val time: Int, - val version: Int + val version: Int, ) { override fun toString(): String { return "LoginExtraData(uin=$uin, ip=${ip.toUHexString()}, time=$time, version=$version)" @@ -122,16 +122,16 @@ internal data class WLoginSigInfo( var wtSessionTicket: KeyWithCreationTime, var wtSessionTicketKey: ByteArray, var deviceToken: ByteArray, - var encryptedDownloadSession: EncryptedDownloadSession? = null + var encryptedDownloadSession: EncryptedDownloadSession? = null, ) { //图片加密下载 //是否加密从bigdatachannel处得知 @Serializable internal class EncryptedDownloadSession( - val appId: Long,//1600000226L + val appId: Long, //1600000226L val stKey: ByteArray, - val stSig: ByteArray + val stSig: ByteArray, ) override fun toString(): String { @@ -147,7 +147,7 @@ internal fun parsePSKeyMapAndPt4TokenMap( creationTime: Long, expireTime: Long, outPSKeyMap: PSKeyMap, - outPt4TokenMap: Pt4TokenMap + outPt4TokenMap: Pt4TokenMap, ) = data.read { repeat(readShort().toInt()) { @@ -166,7 +166,7 @@ internal fun parsePSKeyMapAndPt4TokenMap( internal open class KeyWithExpiry( @SerialName("data1") override val data: ByteArray, @SerialName("creationTime1") override val creationTime: Long, - val expireTime: Long + val expireTime: Long, ) : KeyWithCreationTime(data, creationTime) { override fun toString(): String { return "KeyWithExpiry(data=${data.toUHexString()}, creationTime=$creationTime)" @@ -176,7 +176,7 @@ internal open class KeyWithExpiry( @Serializable internal open class KeyWithCreationTime( open val data: ByteArray, - open val creationTime: Long + open val creationTime: Long, ) { override fun toString(): String { return "KeyWithCreationTime(data=${data.toUHexString()}, creationTime=$creationTime)" diff --git a/mirai-core/src/commonMain/kotlin/network/protocol/LoginType.kt b/mirai-core/src/commonMain/kotlin/network/protocol/LoginType.kt index 261e6fb00..f94a6dc29 100644 --- a/mirai-core/src/commonMain/kotlin/network/protocol/LoginType.kt +++ b/mirai-core/src/commonMain/kotlin/network/protocol/LoginType.kt @@ -23,6 +23,7 @@ internal value class LoginType( * 密码登录 */ val PASSWORD = LoginType(1) + /** * 微信一键登录 */ diff --git a/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/ConfigPush.kt b/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/ConfigPush.kt index 45e7d4293..01d04a26d 100644 --- a/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/ConfigPush.kt +++ b/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/ConfigPush.kt @@ -21,14 +21,14 @@ internal class BigDataChannel( @TarsId(2) @JvmField val sBigdataKeySession: ByteArray? = null, @TarsId(3) @JvmField val uSigUin: Long? = null, @TarsId(4) @JvmField val iConnectFlag: Int? = 1, - @TarsId(5) @JvmField val vBigdataPbBuf: ByteArray? = null + @TarsId(5) @JvmField val vBigdataPbBuf: ByteArray? = null, ) : JceStruct @Serializable internal class BigDataIpInfo( @TarsId(0) @JvmField val uType: Long, @TarsId(1) @JvmField val sIp: String = "", - @TarsId(2) @JvmField val uPort: Long + @TarsId(2) @JvmField val uPort: Long, ) : JceStruct @Serializable @@ -36,7 +36,7 @@ internal class BigDataIpList( @TarsId(0) @JvmField val uServiceType: Long, @TarsId(1) @JvmField val vIplist: List, @TarsId(2) @JvmField val netSegConfs: List? = null, - @TarsId(3) @JvmField val ufragmentSize: Long? = null + @TarsId(3) @JvmField val ufragmentSize: Long? = null, ) : JceStruct @Serializable @@ -46,18 +46,18 @@ internal class ClientLogConfig( @TarsId(3) @JvmField val timeFinish: TimeStamp? = null, @TarsId(4) @JvmField val loglevel: Byte? = null, @TarsId(5) @JvmField val cookie: Int? = null, - @TarsId(6) @JvmField val lseq: Long? = null + @TarsId(6) @JvmField val lseq: Long? = null, ) : JceStruct @Serializable internal class DomainIpChannel( - @TarsId(0) @JvmField val vDomainIplists: List + @TarsId(0) @JvmField val vDomainIplists: List, ) : JceStruct @Serializable internal class DomainIpInfo( @TarsId(1) @JvmField val uIp: Int, - @TarsId(2) @JvmField val uPort: Int + @TarsId(2) @JvmField val uPort: Int, ) : JceStruct @Serializable @@ -65,7 +65,7 @@ internal class DomainIpList( @TarsId(0) @JvmField val uDomainType: Int, @TarsId(1) @JvmField val vIplist: List, @TarsId(2) @JvmField val unknown: ByteArray? = null, - @TarsId(4) @JvmField val int: Int? = null// added + @TarsId(4) @JvmField val int: Int? = null, // added ) : JceStruct @Serializable @@ -84,7 +84,7 @@ internal class _340( @TarsId(13) @JvmField val field1326: List<_339>? = null, @TarsId(14) @JvmField val netType: Byte? = 0, @TarsId(15) @JvmField val heThreshold: Int? = 0, - @TarsId(16) @JvmField val policyId: String? = "" + @TarsId(16) @JvmField val policyId: String? = "", ) : JceStruct @Serializable @@ -97,7 +97,7 @@ internal class _339( @TarsId(6) @JvmField val field1303: Int? = 8, @TarsId(7) @JvmField val field1304: Byte? = 0, @TarsId(8) @JvmField val field1305: String = "", - @TarsId(9) @JvmField val field1306: String = "" + @TarsId(9) @JvmField val field1306: String = "", ) : JceStruct @@ -122,13 +122,13 @@ internal class FileStoragePushFSSvcList( @Serializable internal class FileStorageServerListInfo( @TarsId(1) @JvmField val sIP: String = "", - @TarsId(2) @JvmField val iPort: Int + @TarsId(2) @JvmField val iPort: Int, ) : JceStruct @Serializable internal class FmtIPInfo( @TarsId(0) @JvmField val sGateIp: String = "", - @TarsId(1) @JvmField val iGateIpOper: Long + @TarsId(1) @JvmField val iGateIpOper: Long, ) : JceStruct @Serializable @@ -136,7 +136,7 @@ internal class NetSegConf( @TarsId(0) @JvmField val uint32NetType: Long? = null, @TarsId(1) @JvmField val uint32Segsize: Long? = null, @TarsId(2) @JvmField val uint32Segnum: Long? = null, - @TarsId(3) @JvmField val uint32Curconnnum: Long? = null + @TarsId(3) @JvmField val uint32Curconnnum: Long? = null, ) : JceStruct @Suppress("ArrayInDataClass") @@ -144,7 +144,7 @@ internal class NetSegConf( internal class PushReq( @TarsId(1) @JvmField val type: Int, @TarsId(2) @JvmField val jcebuf: ByteArray, - @TarsId(3) @JvmField val seq: Long + @TarsId(3) @JvmField val seq: Long, ) : JceStruct, Packet @Serializable @@ -167,7 +167,7 @@ internal data class ServerListPush( */ @TarsId(14) val ipv6ConfigVal: Byte? = 0, //@JvmField @TarsId(15) val netTestDelay:Int? = 0, - @TarsId(16) val configDesc: String? = "" + @TarsId(16) val configDesc: String? = "", ) : JceStruct { @Serializable @@ -189,18 +189,19 @@ internal data class ServerListPush( * uni->China unicom 中国联通 * others->其他 */ - @TarsId(9) val ispName: String = "" + @TarsId(9) val ispName: String = "", ) : JceStruct { override fun toString(): String { return "$host:$port" } } } + @Serializable internal class PushResp( @TarsId(1) @JvmField val type: Int, @TarsId(2) @JvmField val seq: Long, - @TarsId(3) @JvmField val jcebuf: ByteArray? = null + @TarsId(3) @JvmField val jcebuf: ByteArray? = null, ) : JceStruct @Serializable @@ -212,7 +213,7 @@ internal class SsoServerList( @TarsId(6) @JvmField val useNewList: Byte? = null, @TarsId(7) @JvmField val iMultiConn: Int? = 1, @TarsId(8) @JvmField val vHttp2g3glist: List? = null, - @TarsId(9) @JvmField val vHttpWifilist: List? = null + @TarsId(9) @JvmField val vHttpWifilist: List? = null, ) : JceStruct @Serializable @@ -222,7 +223,7 @@ internal class SsoServerListInfo( @TarsId(3) @JvmField val linkType: Byte, @TarsId(4) @JvmField val proxy: Byte, @TarsId(5) @JvmField val protocolType: Byte? = null, - @TarsId(6) @JvmField val iTimeOut: Int? = 10 + @TarsId(6) @JvmField val iTimeOut: Int? = 10, ) : JceStruct @Serializable @@ -230,5 +231,5 @@ internal class TimeStamp( @TarsId(1) @JvmField val year: Int, @TarsId(2) @JvmField val month: Byte, @TarsId(3) @JvmField val day: Byte, - @TarsId(4) @JvmField val hour: Byte + @TarsId(4) @JvmField val hour: Byte, ) : JceStruct diff --git a/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/DeviceItemDes.kt b/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/DeviceItemDes.kt index 21c978075..e0fb7c214 100644 --- a/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/DeviceItemDes.kt +++ b/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/DeviceItemDes.kt @@ -14,5 +14,5 @@ import net.mamoe.mirai.internal.utils.io.serialization.tars.TarsId @Serializable internal class DeviceItemDes( - @JvmField @TarsId(0) val vecItemDes: ByteArray + @JvmField @TarsId(0) val vecItemDes: ByteArray, ) : JceStruct diff --git a/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/FriendList.kt b/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/FriendList.kt index 2a42dffa6..f2a4d6998 100644 --- a/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/FriendList.kt +++ b/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/FriendList.kt @@ -19,7 +19,7 @@ internal class DelFriendReq( @JvmField @TarsId(0) val uin: Long, @JvmField @TarsId(1) val delUin: Long, @JvmField @TarsId(2) val delType: Byte, - @JvmField @TarsId(3) val version: Int? = null + @JvmField @TarsId(3) val version: Int? = null, ) : JceStruct @Serializable @@ -27,7 +27,7 @@ internal class DelFriendResp( @JvmField @TarsId(0) val uin: Long, @JvmField @TarsId(1) val delUin: Long, @JvmField @TarsId(2) val result: Int, - @JvmField @TarsId(3) val errorCode: Short? = null + @JvmField @TarsId(3) val errorCode: Short? = null, ) : JceStruct @Serializable @@ -35,7 +35,7 @@ internal class ModifyGroupCardReq( @TarsId(0) @JvmField val dwZero: Long, @TarsId(1) @JvmField val dwGroupCode: Long, @TarsId(2) @JvmField val dwNewSeq: Long, - @TarsId(3) @JvmField val vecUinInfo: List + @TarsId(3) @JvmField val vecUinInfo: List, ) : JceStruct @Serializable @@ -46,7 +46,7 @@ internal class stUinInfo( @TarsId(3) @JvmField val gender: Byte, @TarsId(4) @JvmField val sPhone: String = "", @TarsId(5) @JvmField val sEmail: String = "", - @TarsId(6) @JvmField val sRemark: String = "" + @TarsId(6) @JvmField val sRemark: String = "", ) : JceStruct @Serializable @@ -69,7 +69,7 @@ internal class GetFriendListReq( @TarsId(15) @JvmField val ifGetBothFlag: Byte? = null, @TarsId(16) @JvmField val vec0xd50Req: ByteArray? = null, @TarsId(17) @JvmField val vec0xd6bReq: ByteArray? = null, - @TarsId(18) @JvmField val vecSnsTypelist: List? = null + @TarsId(18) @JvmField val vecSnsTypelist: List? = null, ) : JceStruct @@ -101,13 +101,13 @@ internal class GetFriendListResp( @TarsId(23) @JvmField val stSelfInfo: FriendInfo? = null, @TarsId(24) @JvmField val showPcIcon: Byte? = null, @TarsId(25) @JvmField val wGetExtSnsRspCode: Short? = null, - @TarsId(26) @JvmField val stSubSrvRspCode: FriendListSubSrvRspCode? = null + @TarsId(26) @JvmField val stSubSrvRspCode: FriendListSubSrvRspCode? = null, ) : JceStruct @Serializable internal class FriendListSubSrvRspCode( @TarsId(0) @JvmField val wGetMutualMarkRspCode: Short? = null, - @TarsId(1) @JvmField val wGetIntimateInfoRspCode: Short? = null + @TarsId(1) @JvmField val wGetIntimateInfoRspCode: Short? = null, ) : JceStruct @Serializable @@ -168,7 +168,7 @@ internal class FriendInfo( @TarsId(53) @JvmField val showNameplate: Byte? = null, @TarsId(54) @JvmField val newLoverDiamondFlag: Byte? = null, @TarsId(55) @JvmField val vecExtSnsFrdData: ByteArray? = null, - @TarsId(56) @JvmField val vecMutualMarkData: ByteArray? = null + @TarsId(56) @JvmField val vecMutualMarkData: ByteArray? = null, ) : JceStruct @Serializable @@ -176,7 +176,7 @@ internal class VipBaseInfo( @TarsId(0) @JvmField val mOpenInfo: Map? = null, // 1, 2 are since 8.2.7 @TarsId(1) @JvmField val iNameplateVipType: Int? = 0, - @TarsId(2) @JvmField val iGrayNameplateFlag: Int? = 0 + @TarsId(2) @JvmField val iGrayNameplateFlag: Int? = 0, ) : JceStruct @Serializable @@ -185,7 +185,7 @@ internal class VipOpenInfo( @TarsId(1) @JvmField val iVipType: Int = -1, @TarsId(2) @JvmField val iVipLevel: Int = -1, @TarsId(3) @JvmField val iVipFlag: Int? = null, - @TarsId(4) @JvmField val nameplateId: Long? = null + @TarsId(4) @JvmField val nameplateId: Long? = null, ) : JceStruct @Serializable @@ -195,6 +195,6 @@ internal class GroupInfo( @TarsId(2) @JvmField val friendCount: Int, @TarsId(3) @JvmField val onlineFriendCount: Int, @TarsId(4) @JvmField val seqid: Byte? = null, - @TarsId(5) @JvmField val sqqOnLineCount: Int? = null + @TarsId(5) @JvmField val sqqOnLineCount: Int? = null, ) : JceStruct diff --git a/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/GroupMngReq.kt b/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/GroupMngReq.kt index 1be9ddfdc..a0b752aa3 100644 --- a/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/GroupMngReq.kt +++ b/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/GroupMngReq.kt @@ -31,7 +31,7 @@ internal class GroupMngReqJce( @TarsId(13) @JvmField val vecJoinGroupRichMsg: ByteArray? = null, @TarsId(14) @JvmField val sJoinGroupAuth: String? = "", @TarsId(15) @JvmField val sJoinGroupVerifyToken: String? = "", - @TarsId(16) @JvmField val dwJoinVerifyType: Long? = null + @TarsId(16) @JvmField val dwJoinVerifyType: Long? = null, ) : JceStruct @Serializable @@ -47,5 +47,5 @@ internal class GroupMngRes( @TarsId(8) @JvmField val sAuthGrpInfo: String? = "", @TarsId(9) @JvmField val sJoinQuestion: String? = "", @TarsId(10) @JvmField val sJoinAnswer: String? = "", - @TarsId(11) @JvmField val dwDis2GrpLimitType: Long? = null + @TarsId(11) @JvmField val dwDis2GrpLimitType: Long? = null, ) : JceStruct diff --git a/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/InstanceInfo.kt b/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/InstanceInfo.kt index 191cbc10e..ed91964a8 100644 --- a/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/InstanceInfo.kt +++ b/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/InstanceInfo.kt @@ -23,5 +23,5 @@ internal data class InstanceInfo( * @see ClientKind */ @JvmField @TarsId(3) val iProductType: Long? = null, - @JvmField @TarsId(4) val iClientType: Long? = null + @JvmField @TarsId(4) val iClientType: Long? = null, ) : JceStruct diff --git a/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/MsgType0x210.kt b/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/MsgType0x210.kt index cb0ee4cd4..beee7702e 100644 --- a/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/MsgType0x210.kt +++ b/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/MsgType0x210.kt @@ -18,47 +18,47 @@ import net.mamoe.mirai.utils.EMPTY_BYTE_ARRAY internal class AddGroup( @TarsId(0) @JvmField val dwGroupID: Long? = null, @TarsId(1) @JvmField val dwSortID: Long? = null, - @TarsId(2) @JvmField val groupName: String? = "" + @TarsId(2) @JvmField val groupName: String? = "", ) : JceStruct @Serializable internal class DelGroup( - @TarsId(0) @JvmField val dwGroupID: Long? = null + @TarsId(0) @JvmField val dwGroupID: Long? = null, ) : JceStruct @Serializable internal class FriendGroup( @TarsId(0) @JvmField val dwFuin: Long? = null, @TarsId(1) @JvmField val vOldGroupID: List? = null, - @TarsId(2) @JvmField val vNewGroupID: List? = null + @TarsId(2) @JvmField val vNewGroupID: List? = null, ) : JceStruct @Serializable internal class GroupSort( @TarsId(0) @JvmField val dwGroupID: Long? = null, - @TarsId(1) @JvmField val dwSortID: Long? = null + @TarsId(1) @JvmField val dwSortID: Long? = null, ) : JceStruct @Serializable internal class MarketFaceInfo( @TarsId(0) @JvmField val insertIdx: Long, - @TarsId(1) @JvmField val marketFaceBuff: ByteArray + @TarsId(1) @JvmField val marketFaceBuff: ByteArray, ) : JceStruct @Serializable internal class ModFriendGroup( - @TarsId(0) @JvmField val vMsgFrdGroup: List? = null + @TarsId(0) @JvmField val vMsgFrdGroup: List? = null, ) : JceStruct @Serializable internal class ModGroupName( @TarsId(0) @JvmField val dwGroupID: Long? = null, - @TarsId(1) @JvmField val groupName: String? = "" + @TarsId(1) @JvmField val groupName: String? = "", ) : JceStruct @Serializable internal class ModGroupSort( - @TarsId(0) @JvmField val vMsgGroupSort: List? = null + @TarsId(0) @JvmField val vMsgGroupSort: List? = null, ) : JceStruct @Serializable @@ -72,7 +72,7 @@ internal class MsgType0x210( @TarsId(7) @JvmField val stMsgInfo0x20: MsgType0x210SubMsgType0x20? = null, @TarsId(8) @JvmField val stMsgInfo0x1d: MsgType0x210SubMsgType0x1d? = null, @TarsId(9) @JvmField val stMsgInfo0x24: MsgType0x210SubMsgType0x24? = null, - @TarsId(10) @JvmField val vProtobuf: ByteArray = EMPTY_BYTE_ARRAY + @TarsId(10) @JvmField val vProtobuf: ByteArray = EMPTY_BYTE_ARRAY, ) : JceStruct @Serializable @@ -86,13 +86,13 @@ internal class MsgType0x210SubMsgType0x13( @TarsId(6) @JvmField val uint32Size: Long? = null, @TarsId(7) @JvmField val uint32Index: Long? = null, @TarsId(8) @JvmField val uint32Type: Long? = null, - @TarsId(9) @JvmField val buf: ByteArray? = null + @TarsId(9) @JvmField val buf: ByteArray? = null, ) : JceStruct @Serializable internal class MsgType0x210SubMsgType0x13_MsgItem( @TarsId(0) @JvmField val uint32Type: Long? = null, - @TarsId(1) @JvmField val text: ByteArray? = null + @TarsId(1) @JvmField val text: ByteArray? = null, ) : JceStruct @Serializable @@ -102,7 +102,7 @@ internal class MsgType0x210SubMsgType0x17( @TarsId(2) @JvmField val stDelGroup: DelGroup? = null, @TarsId(3) @JvmField val stModGroupName: ModGroupName? = null, @TarsId(4) @JvmField val stModGroupSort: ModGroupSort? = null, - @TarsId(5) @JvmField val stModFriendGroup: ModFriendGroup? = null + @TarsId(5) @JvmField val stModFriendGroup: ModFriendGroup? = null, ) : JceStruct @Serializable @@ -110,7 +110,7 @@ internal class MsgType0x210SubMsgType0x1d( @TarsId(0) @JvmField val dwOpType: Long? = null, @TarsId(1) @JvmField val dwUin: Long? = null, @TarsId(2) @JvmField val dwID: Long? = null, - @TarsId(3) @JvmField val value: String? = "" + @TarsId(3) @JvmField val value: String? = "", ) : JceStruct @Serializable @@ -130,7 +130,7 @@ internal class MsgType0x210SubMsgType0x2( @TarsId(12) @JvmField val sessionId: Long? = null, @TarsId(13) @JvmField val originfileMd5: ByteArray? = null, @TarsId(14) @JvmField val uOriginfiletype: Long? = null, - @TarsId(15) @JvmField val uSeq: Long? = null + @TarsId(15) @JvmField val uSeq: Long? = null, ) : JceStruct @Serializable @@ -138,12 +138,12 @@ internal class MsgType0x210SubMsgType0x20( @TarsId(0) @JvmField val dwOpType: Long? = null, @TarsId(1) @JvmField val dwType: Long? = null, @TarsId(2) @JvmField val dwUin: Long? = null, - @TarsId(3) @JvmField val remaek: String? = "" + @TarsId(3) @JvmField val remaek: String? = "", ) : JceStruct @Serializable internal class MsgType0x210SubMsgType0x24( - @TarsId(0) @JvmField val vPluginNumList: List? = null + @TarsId(0) @JvmField val vPluginNumList: List? = null, ) : JceStruct @Serializable @@ -164,7 +164,7 @@ internal class MsgType0x210SubMsgType0xa( @TarsId(13) @JvmField val sessionId: Long? = null, @TarsId(14) @JvmField val originfileMd5: ByteArray? = null, @TarsId(15) @JvmField val uOriginfiletype: Long? = null, - @TarsId(16) @JvmField val uSeq: Long? = null + @TarsId(16) @JvmField val uSeq: Long? = null, ) : JceStruct @Serializable @@ -178,25 +178,25 @@ internal class MsgType0x210SubMsgType0xe( @TarsId(6) @JvmField val uint32Operate: Long? = null, @TarsId(7) @JvmField val uint32Seq: Long? = null, @TarsId(8) @JvmField val uint32Code: Long? = null, - @TarsId(9) @JvmField val msg: String? = "" + @TarsId(9) @JvmField val msg: String? = "", ) : JceStruct @Serializable internal class PersonInfoChange( @TarsId(0) @JvmField val type: Byte? = null, - @TarsId(1) @JvmField val vChgField: List? = null + @TarsId(1) @JvmField val vChgField: List? = null, ) : JceStruct @Serializable internal class PersonInfoField( - @TarsId(0) @JvmField val uField: Long? = null + @TarsId(0) @JvmField val uField: Long? = null, ) : JceStruct @Serializable internal class PluginNum( @TarsId(0) @JvmField val dwID: Long? = null, @TarsId(1) @JvmField val dwNUm: Long? = null, - @TarsId(2) @JvmField val flag: Byte? = null + @TarsId(2) @JvmField val flag: Byte? = null, ) : JceStruct @Serializable @@ -214,11 +214,11 @@ internal class SlaveMasterMsg( @TarsId(10) @JvmField val uLastChangeTime: Long? = null, @TarsId(11) @JvmField val vReserved: ByteArray? = null, @TarsId(12) @JvmField val vMarketFace: List? = null, - @TarsId(13) @JvmField val uSuperQQBubbleId: Long? = null + @TarsId(13) @JvmField val uSuperQQBubbleId: Long? = null, ) : JceStruct @Serializable internal class Type_1_QQDataTextMsg( - @TarsId(0) @JvmField val msgItem: List? = null + @TarsId(0) @JvmField val msgItem: List? = null, ) : JceStruct diff --git a/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/OnlinePushPack.kt b/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/OnlinePushPack.kt index dfcee6383..3251ea56b 100644 --- a/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/OnlinePushPack.kt +++ b/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/OnlinePushPack.kt @@ -26,7 +26,7 @@ internal class OnlinePushPack { @TarsId(7) @JvmField val sendTime: Long? = null, @TarsId(8) @JvmField val ssoSeq: Int? = null, @TarsId(9) @JvmField val ssoIp: Int? = null, - @TarsId(10) @JvmField val clientIp: Int? = null + @TarsId(10) @JvmField val clientIp: Int? = null, ) : JceStruct @Serializable @@ -36,7 +36,7 @@ internal class OnlinePushPack { @TarsId(2) @JvmField val oSVer: String? = "", @TarsId(3) @JvmField val vendorName: String? = "", @TarsId(4) @JvmField val vendorOSName: String? = "", - @TarsId(5) @JvmField val iOSIdfa: String? = "" + @TarsId(5) @JvmField val iOSIdfa: String? = "", ) : JceStruct @Serializable @@ -60,7 +60,7 @@ internal class OnlinePushPack { @TarsId(16) @JvmField val fromMobile: String? = "", @TarsId(17) @JvmField val fromName: String? = "", @TarsId(18) @JvmField val vNickName: List? = null, - @TarsId(19) @JvmField val stC2CTmpMsgHead: TempMsgHead? = null + @TarsId(19) @JvmField val stC2CTmpMsgHead: TempMsgHead? = null, ) : JceStruct @Serializable @@ -71,7 +71,7 @@ internal class OnlinePushPack { @TarsId(3) @JvmField val svrip: Int? = 0, @TarsId(4) @JvmField val vSyncCookie: ByteArray? = null, @TarsId(5) @JvmField val vUinPairMsg: List? = null, - @TarsId(6) @JvmField val mPreviews: Map? = null + @TarsId(6) @JvmField val mPreviews: Map? = null, // @SerialId(7) @JvmField val wUserActive: Int? = null, //@SerialId(12) @JvmField val wGeneralFlag: Int? = null ) : JceStruct @@ -83,7 +83,7 @@ internal class OnlinePushPack { @TarsId(2) @JvmField val svrip: Int = 0, @TarsId(3) @JvmField val pushToken: ByteArray? = null, @TarsId(4) @JvmField val serviceType: Int? = null, - @TarsId(5) @JvmField val deviceInfo: DeviceInfo? = null + @TarsId(5) @JvmField val deviceInfo: DeviceInfo? = null, ) : JceStruct @Serializable @@ -91,7 +91,7 @@ internal class OnlinePushPack { @TarsId(1) @JvmField val uLastReadTime: Long? = null, @TarsId(2) @JvmField val peerUin: Long? = null, @TarsId(3) @JvmField val uMsgCompleted: Long? = null, - @TarsId(4) @JvmField val vMsgInfos: List? = null + @TarsId(4) @JvmField val vMsgInfos: List? = null, ) : JceStruct @Serializable @@ -105,7 +105,7 @@ internal class OnlinePushPack { @TarsId(7) @JvmField val stMsgInfo0x20: MsgType0x210SubMsgType0x20? = null, @TarsId(8) @JvmField val stMsgInfo0x1d: MsgType0x210SubMsgType0x1d? = null, @TarsId(9) @JvmField val stMsgInfo0x24: MsgType0x210SubMsgType0x24? = null, - @TarsId(10) @JvmField val vProtobuf: ByteArray? = null + @TarsId(10) @JvmField val vProtobuf: ByteArray? = null, ) : JceStruct @Serializable @@ -119,7 +119,7 @@ internal class OnlinePushPack { @TarsId(6) @JvmField val uint32Size: Long? = null, @TarsId(7) @JvmField val uint32Index: Long? = null, @TarsId(8) @JvmField val uint32Type: Long? = null, - @TarsId(9) @JvmField val buf: ByteArray? = null + @TarsId(9) @JvmField val buf: ByteArray? = null, ) : JceStruct @Serializable @@ -129,48 +129,48 @@ internal class OnlinePushPack { @TarsId(2) @JvmField val stDelGroup: DelGroup? = null, @TarsId(3) @JvmField val stModGroupName: ModGroupName? = null, @TarsId(4) @JvmField val stModGroupSort: ModGroupSort? = null, - @TarsId(5) @JvmField val stModFriendGroup: ModFriendGroup? = null + @TarsId(5) @JvmField val stModFriendGroup: ModFriendGroup? = null, ) : JceStruct @Serializable internal class AddGroup( @TarsId(0) @JvmField val dwGroupID: Long? = null, @TarsId(1) @JvmField val dwSortID: Long? = null, - @TarsId(2) @JvmField val groupName: String? = "" + @TarsId(2) @JvmField val groupName: String? = "", ) : JceStruct @Serializable internal class DelGroup( - @TarsId(0) @JvmField val dwGroupID: Long? = null + @TarsId(0) @JvmField val dwGroupID: Long? = null, ) : JceStruct @Serializable internal class ModFriendGroup( - @TarsId(0) @JvmField val vMsgFrdGroup: List? = null + @TarsId(0) @JvmField val vMsgFrdGroup: List? = null, ) : JceStruct @Serializable internal class FriendGroup( @TarsId(0) @JvmField val dwFuin: Long? = null, @TarsId(1) @JvmField val vOldGroupID: List? = null, - @TarsId(2) @JvmField val vNewGroupID: List? = null + @TarsId(2) @JvmField val vNewGroupID: List? = null, ) : JceStruct @Serializable internal class ModGroupName( @TarsId(0) @JvmField val dwGroupID: Long? = null, - @TarsId(1) @JvmField val groupName: String? = "" + @TarsId(1) @JvmField val groupName: String? = "", ) : JceStruct @Serializable internal class ModGroupSort( - @TarsId(0) @JvmField val vMsgGroupSort: List? = null + @TarsId(0) @JvmField val vMsgGroupSort: List? = null, ) : JceStruct @Serializable internal class GroupSort( @TarsId(0) @JvmField val dwGroupID: Long? = null, - @TarsId(1) @JvmField val dwSortID: Long? = null + @TarsId(1) @JvmField val dwSortID: Long? = null, ) : JceStruct @Serializable @@ -178,7 +178,7 @@ internal class OnlinePushPack { @TarsId(0) @JvmField val dwOpType: Long? = null, @TarsId(1) @JvmField val dwUin: Long? = null, @TarsId(2) @JvmField val dwID: Long? = null, - @TarsId(3) @JvmField val value: String? = "" + @TarsId(3) @JvmField val value: String? = "", ) : JceStruct @Serializable @@ -198,7 +198,7 @@ internal class OnlinePushPack { @TarsId(12) @JvmField val sessionId: Long? = null, @TarsId(13) @JvmField val originfileMd5: ByteArray? = null, @TarsId(14) @JvmField val uOriginfiletype: Long? = null, - @TarsId(15) @JvmField val uSeq: Long? = null + @TarsId(15) @JvmField val uSeq: Long? = null, ) : JceStruct @Serializable @@ -206,19 +206,19 @@ internal class OnlinePushPack { @TarsId(0) @JvmField val dwOpType: Long? = null, @TarsId(1) @JvmField val dwType: Long? = null, @TarsId(2) @JvmField val dwUin: Long? = null, - @TarsId(3) @JvmField val remaek: String? = "" + @TarsId(3) @JvmField val remaek: String? = "", ) : JceStruct @Serializable internal class MsgType0x210SubMsgType0x24( - @TarsId(0) @JvmField val vPluginNumList: List? = null + @TarsId(0) @JvmField val vPluginNumList: List? = null, ) : JceStruct @Serializable internal class PluginNum( @TarsId(0) @JvmField val dwID: Long? = null, @TarsId(1) @JvmField val dwNUm: Long? = null, - @TarsId(2) @JvmField val flag: Byte? = null + @TarsId(2) @JvmField val flag: Byte? = null, ) : JceStruct @Serializable @@ -239,7 +239,7 @@ internal class OnlinePushPack { @TarsId(13) @JvmField val sessionId: Long? = null, @TarsId(14) @JvmField val originfileMd5: ByteArray? = null, @TarsId(15) @JvmField val uOriginfiletype: Long? = null, - @TarsId(16) @JvmField val uSeq: Long? = null + @TarsId(16) @JvmField val uSeq: Long? = null, ) : JceStruct @Serializable @@ -253,6 +253,6 @@ internal class OnlinePushPack { @TarsId(6) @JvmField val uint32Operate: Long? = null, @TarsId(7) @JvmField val uint32Seq: Long? = null, @TarsId(8) @JvmField val uint32Code: Long? = null, - @TarsId(9) @JvmField val msg: String? = "" + @TarsId(9) @JvmField val msg: String? = "", ) : JceStruct } \ No newline at end of file diff --git a/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/PushNotifyPack.kt b/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/PushNotifyPack.kt index 0b9d8509c..12ddbff03 100644 --- a/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/PushNotifyPack.kt +++ b/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/PushNotifyPack.kt @@ -31,7 +31,7 @@ internal class RequestPushNotify( @TarsId(10) @JvmField val msgCtrlBuf: String?, @TarsId(11) @JvmField val serverBuf: ByteArray?, @TarsId(12) @JvmField val pingFlag: Long?, - @TarsId(13) @JvmField val svrip: Int? + @TarsId(13) @JvmField val svrip: Int?, ) : JceStruct, Packet { override fun toString(): String { return "RequestPushNotify(usMsgType=$usMsgType)" @@ -58,7 +58,7 @@ internal class MsgInfo( @TarsId(15) @JvmField val vRemarkOfSender: ByteArray?, @TarsId(16) @JvmField val strFromMobile: String?, @TarsId(17) @JvmField val strFromName: String?, - @TarsId(18) @JvmField val vNickName: List?//, + @TarsId(18) @JvmField val vNickName: List?, //, //@SerialId(19) @JvmField val stC2CTmpMsgHead: TempMsgHead? ) : JceStruct @@ -68,17 +68,17 @@ internal class ShareData( @TarsId(0) @JvmField val pkgname: String = "", @TarsId(1) @JvmField val msgtail: String = "", @TarsId(2) @JvmField val picurl: String = "", - @TarsId(3) @JvmField val url: String = "" + @TarsId(3) @JvmField val url: String = "", ) : JceStruct @Serializable internal class TempMsgHead( @TarsId(0) @JvmField val c2c_type: Int? = 0, - @TarsId(1) @JvmField val serviceType: Int? = 0 + @TarsId(1) @JvmField val serviceType: Int? = 0, ) : JceStruct @Serializable internal class CPicInfo( @TarsId(0) @JvmField val vPath: ByteArray = EMPTY_BYTE_ARRAY, - @TarsId(1) @JvmField val vHost: ByteArray? = EMPTY_BYTE_ARRAY + @TarsId(1) @JvmField val vHost: ByteArray? = EMPTY_BYTE_ARRAY, ) : JceStruct \ No newline at end of file diff --git a/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/ReqPushStatus.kt b/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/ReqPushStatus.kt index 2eac217d0..3ccac2f02 100644 --- a/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/ReqPushStatus.kt +++ b/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/ReqPushStatus.kt @@ -24,7 +24,7 @@ internal class RequestPushStatus( @JvmField @TarsId(5) val nPCVer: Long? = null, @JvmField @TarsId(6) val nClientType: Long? = null, @JvmField @TarsId(7) val nInstanceId: Long? = null, - @JvmField @TarsId(8) val vecInstanceList: List? = null + @JvmField @TarsId(8) val vecInstanceList: List? = null, ) : JceStruct diff --git a/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/ReqSummaryCard.kt b/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/ReqSummaryCard.kt index 248d1e402..b83b9982b 100644 --- a/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/ReqSummaryCard.kt +++ b/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/ReqSummaryCard.kt @@ -16,7 +16,7 @@ import net.mamoe.mirai.internal.utils.io.serialization.tars.TarsId @Serializable internal class ReqHead( - @JvmField @TarsId(0) val iVersion: Int = 1 + @JvmField @TarsId(0) val iVersion: Int = 1, ) : JceStruct @Serializable @@ -53,19 +53,19 @@ internal class RespHead( @JvmField @TarsId(0) val iVersion: Int, @JvmField @TarsId(1) val iResult: Int, @JvmField @TarsId(2) val errorMsg: String = "", - @JvmField @TarsId(3) val vCookies: ByteArray? = null + @JvmField @TarsId(3) val vCookies: ByteArray? = null, ) : JceStruct @Serializable internal class RespSearch( @JvmField @TarsId(0) val vRecords: List, @JvmField @TarsId(1) val vSecureSig: ByteArray? = null, - @JvmField @TarsId(2) val vvRespServices: List? = null + @JvmField @TarsId(2) val vvRespServices: List? = null, ) : JceStruct @Serializable internal class RespSummaryCard( -// @JvmField @TarsId(0) val iFace: Int? = null, + // @JvmField @TarsId(0) val iFace: Int? = null, @JvmField @TarsId(1) val sex: Byte? = null, @JvmField @TarsId(2) val age: Byte? = null, @JvmField @TarsId(3) val nick: String? = "", @@ -80,7 +80,7 @@ internal class RespSummaryCard( @JvmField @TarsId(12) val contactName: String? = "", @JvmField @TarsId(13) val ulShowControl: Long? = null, @JvmField @TarsId(14) val qzoneFeedsDesc: String? = "", -// @JvmField @TarsId(15) val oLatestPhotos:AlbumInfo? = null, + // @JvmField @TarsId(15) val oLatestPhotos:AlbumInfo? = null, @JvmField @TarsId(16) val iVoteCount: Int? = null, @JvmField @TarsId(17) val iLastestVoteCount: Int? = null, @JvmField @TarsId(18) val valid4Vote: Byte? = null, @@ -113,20 +113,20 @@ internal class RespSummaryCard( @JvmField @TarsId(45) val uAccelerateMultiple: Long? = null, @JvmField @TarsId(46) val vvRespServices: List? = null, @JvmField @TarsId(47) val spaceName: String? = "", -// @JvmField @TarsId(48) val stDateCard:DateCard? = null, + // @JvmField @TarsId(48) val stDateCard:DateCard? = null, @JvmField @TarsId(49) val iBirthday: Int? = null, -// @JvmField @TarsId(50) val stQCallInfo:QCallInfo? = null, -// @JvmField @TarsId(51) val stGiftInfo:GiftInfo? = null, -// @JvmField @TarsId(52) val stPanSocialInfo:PanSocialInfo? = null, -// @JvmField @TarsId(53) val stVideoInfo:QQVideoInfo? = null, + // @JvmField @TarsId(50) val stQCallInfo:QCallInfo? = null, + // @JvmField @TarsId(51) val stGiftInfo:GiftInfo? = null, + // @JvmField @TarsId(52) val stPanSocialInfo:PanSocialInfo? = null, + // @JvmField @TarsId(53) val stVideoInfo:QQVideoInfo? = null, @JvmField @TarsId(54) val vTempChatSig: ByteArray? = null, -// @JvmField @TarsId(55) val stInterestTag:InterestTagInfo? = null, -// @JvmField @TarsId(56) val stUserFeed: UserFeed? = null, -// @JvmField @TarsId(57) val stQiqiVideoInfo:QiqiVideoInfo? = null, -// @JvmField @TarsId(58) val stPrivInfo:PrivilegeBaseInfo? = null, -// @JvmField @TarsId(59) val stApollo:QQApolloInfo? = null, -// @JvmField @TarsId(60) val stAddFrdSrcInfo:AddFrdSrcInfo? = null, -// @JvmField @TarsId(61) val stBindPhoneInfo:BindPhoneInfo? = null, + // @JvmField @TarsId(55) val stInterestTag:InterestTagInfo? = null, + // @JvmField @TarsId(56) val stUserFeed: UserFeed? = null, + // @JvmField @TarsId(57) val stQiqiVideoInfo:QiqiVideoInfo? = null, + // @JvmField @TarsId(58) val stPrivInfo:PrivilegeBaseInfo? = null, + // @JvmField @TarsId(59) val stApollo:QQApolloInfo? = null, + // @JvmField @TarsId(60) val stAddFrdSrcInfo:AddFrdSrcInfo? = null, + // @JvmField @TarsId(61) val stBindPhoneInfo:BindPhoneInfo? = null, @JvmField @TarsId(62) val vVisitingCardInfo: ByteArray? = null, @JvmField @TarsId(63) val voteLimitedNotice: String? = "", @JvmField @TarsId(64) val haveVotedCnt: Short? = null, @@ -137,13 +137,13 @@ internal class RespSummaryCard( @JvmField @TarsId(69) val uCareer: Long? = null, @JvmField @TarsId(70) val personal: String? = "", @JvmField @TarsId(71) val vHotChatInfo: ByteArray? = null, -// @JvmField @TarsId(72) val stOlympicInfo:OlympicInfo? = null, + // @JvmField @TarsId(72) val stOlympicInfo:OlympicInfo? = null, @JvmField @TarsId(73) val stCoverInfo: TCoverInfo? = null, @JvmField @TarsId(74) val stNowBroadcastInfo: TNowBroadcastInfo? = null, -// @JvmField @TarsId(75) val stEimInfo:TEIMInfo? = null, + // @JvmField @TarsId(75) val stEimInfo:TEIMInfo? = null, @JvmField @TarsId(78) val stVideoHeadInfo: TVideoHeadInfo? = null, @JvmField @TarsId(79) val iContactNotBindQQ: Int? = null, -// @JvmField @TarsId(80) val stMedalWallInfo:TMedalWallInfo? = null, + // @JvmField @TarsId(80) val stMedalWallInfo:TMedalWallInfo? = null, @JvmField @TarsId(81) val vvRespServicesBigOrder: List? = null, @JvmField @TarsId(82) val vResp0x5ebInfo: ByteArray? = null, @JvmField @TarsId(83) val stNearbyGodInfo: TNearbyGodInfo? = null, @@ -153,7 +153,7 @@ internal class RespSummaryCard( @JvmField @TarsId(87) val stCampusCircleInfo: TCampusCircleInfo? = null, @JvmField @TarsId(88) val stTimInfo: TTimInfo? = null, @JvmField @TarsId(89) val stQimInfo: TQimInfo? = null, -// @JvmField @TarsId(90) val stHeartInfo:HeartInfo? = null, + // @JvmField @TarsId(90) val stHeartInfo:HeartInfo? = null, @JvmField @TarsId(91) val vQzoneCoverInfo: ByteArray? = null, @JvmField @TarsId(92) val vNearbyTaskInfo: ByteArray? = null, @JvmField @TarsId(93) val vNowInfo: ByteArray? = null, @@ -163,15 +163,15 @@ internal class RespSummaryCard( @JvmField @TarsId(97) val qzoneHeader: String? = "", @JvmField @TarsId(98) val mapQzoneEx: Map? = null, @JvmField @TarsId(99) val vRespKandianInfo: ByteArray? = null, -// @JvmField @TarsId(100) val stWeishiInfo:WeishiInfo? = null, + // @JvmField @TarsId(100) val stWeishiInfo:WeishiInfo? = null, @JvmField @TarsId(101) val uRichCardNameVer: Long? = null, @JvmField @TarsId(102) val uCurMulType: Long? = null, - @JvmField @TarsId(103) val vLongNickTopicInfo: ByteArray? = null + @JvmField @TarsId(103) val vLongNickTopicInfo: ByteArray? = null, ) : JceStruct @Serializable internal class RespVoiceManage( - @JvmField @TarsId(0) val eOpType: Int + @JvmField @TarsId(0) val eOpType: Int, ) : JceStruct @Serializable @@ -182,7 +182,7 @@ internal class SearchInfo( @JvmField @TarsId(3) val mobile: String? = "", @JvmField @TarsId(4) val isFriend: Byte? = null, @JvmField @TarsId(5) val inContact: Byte? = null, - @JvmField @TarsId(6) val isEnterpriseQQ: Byte? = null + @JvmField @TarsId(6) val isEnterpriseQQ: Byte? = null, ) : JceStruct @Serializable @@ -191,26 +191,26 @@ internal class TCampusCircleInfo( @JvmField @TarsId(1) val name: String? = "", @JvmField @TarsId(2) val academy: String? = "", @JvmField @TarsId(3) val eStatus: Int? = null, - @JvmField @TarsId(4) val stSchoolInfo: TCampusSchoolInfo? = null + @JvmField @TarsId(4) val stSchoolInfo: TCampusSchoolInfo? = null, ) : JceStruct @Serializable internal class TCampusSchoolInfo( @JvmField @TarsId(0) val uTimestamp: Long? = null, @JvmField @TarsId(1) val uSchoolId: Long? = null, - @JvmField @TarsId(2) val iIsValidForCertified: Int? = null + @JvmField @TarsId(2) val iIsValidForCertified: Int? = null, ) : JceStruct @Serializable internal class TCoverInfo( - @JvmField @TarsId(0) val vTagInfo: ByteArray? = null + @JvmField @TarsId(0) val vTagInfo: ByteArray? = null, ) : JceStruct @Serializable internal class TNearbyGodInfo( @JvmField @TarsId(0) val iIsGodFlag: Int? = null, - @JvmField @TarsId(1) val jumpUrl: String? = "" + @JvmField @TarsId(1) val jumpUrl: String? = "", ) : JceStruct @Serializable @@ -218,42 +218,42 @@ internal class TNowBroadcastInfo( @JvmField @TarsId(0) val iFlag: Int? = null, @JvmField @TarsId(1) val iconURL: String? = "", @JvmField @TarsId(2) val hrefURL: String? = "", - @JvmField @TarsId(3) val vAnchorDataRsp: ByteArray? = null + @JvmField @TarsId(3) val vAnchorDataRsp: ByteArray? = null, ) : JceStruct @Serializable internal class TPraiseInfo( @JvmField @TarsId(0) val uCustomId: Long? = null, - @JvmField @TarsId(1) val iIsPayed: Int? = null + @JvmField @TarsId(1) val iIsPayed: Int? = null, ) : JceStruct @Serializable internal class TQimInfo( - @JvmField @TarsId(0) val iIsOnline: Int? = null + @JvmField @TarsId(0) val iIsOnline: Int? = null, ) : JceStruct @Serializable internal class TTimInfo( - @JvmField @TarsId(0) val iIsOnline: Int? = null + @JvmField @TarsId(0) val iIsOnline: Int? = null, ) : JceStruct @Serializable internal class TVideoHeadInfo( @JvmField @TarsId(0) val iNearbyFlag: Int? = null, @JvmField @TarsId(1) val iBasicFlag: Int? = null, - @JvmField @TarsId(2) val vMsg: ByteArray? = null + @JvmField @TarsId(2) val vMsg: ByteArray? = null, ) : JceStruct @Serializable internal class UserFeed( @JvmField @TarsId(0) val uFlag: Long? = null, - @JvmField @TarsId(1) val vFeedInfo: ByteArray? = null + @JvmField @TarsId(1) val vFeedInfo: ByteArray? = null, ) : JceStruct @Serializable internal class UserLocaleInfo( @JvmField @TarsId(1) val longitude: Long? = null, - @JvmField @TarsId(2) val latitude: Long? = null + @JvmField @TarsId(2) val latitude: Long? = null, ) : JceStruct @Serializable @@ -261,5 +261,5 @@ internal class VoiceInfo( @JvmField @TarsId(0) val vVoiceId: ByteArray? = null, @JvmField @TarsId(1) val shDuration: Short? = null, @JvmField @TarsId(2) val read: Byte? = 2, - @JvmField @TarsId(3) val url: String? = "" + @JvmField @TarsId(3) val url: String? = "", ) : JceStruct diff --git a/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/RequestMSFForceOffline.kt b/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/RequestMSFForceOffline.kt index 1eaf3a1e2..fb2ff8afa 100644 --- a/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/RequestMSFForceOffline.kt +++ b/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/RequestMSFForceOffline.kt @@ -22,7 +22,7 @@ internal class RequestMSFForceOffline( @TarsId(4) @JvmField val title: String? = "", @TarsId(5) @JvmField val sigKick: Byte? = 0, @TarsId(6) @JvmField val vecSigKickData: ByteArray? = null, - @TarsId(7) @JvmField val sameDevice: Byte? = 0 + @TarsId(7) @JvmField val sameDevice: Byte? = 0, ) : JceStruct @@ -30,5 +30,5 @@ internal class RequestMSFForceOffline( internal class RspMSFForceOffline( @TarsId(0) @JvmField val uin: Long, @TarsId(1) @JvmField val seq: Long, - @TarsId(2) @JvmField val const: Byte = 0 + @TarsId(2) @JvmField val const: Byte = 0, ) : JceStruct \ No newline at end of file diff --git a/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/RequestPacket.kt b/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/RequestPacket.kt index 930300e8b..eceb93c07 100644 --- a/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/RequestPacket.kt +++ b/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/RequestPacket.kt @@ -27,20 +27,20 @@ internal class RequestPacket( @TarsId(7) @JvmField val sBuffer: ByteArray = EMPTY_BYTE_ARRAY, @TarsId(8) @JvmField val iTimeout: Int? = 0, @TarsId(9) @JvmField val context: Map? = EMPTY_MAP, - @TarsId(10) @JvmField val status: Map? = EMPTY_MAP + @TarsId(10) @JvmField val status: Map? = EMPTY_MAP, ) : JceStruct @Serializable internal class RequestDataVersion3( - @TarsId(0) @JvmField val map: Map // 注意: ByteArray 不能直接放序列化的 JceStruct!! 要放类似 RequestDataStructSvcReqRegister 的 + @TarsId(0) @JvmField val map: Map, // 注意: ByteArray 不能直接放序列化的 JceStruct!! 要放类似 RequestDataStructSvcReqRegister 的 ) : JceStruct @Serializable internal class RequestDataVersion2( - @TarsId(0) @JvmField val map: Map> + @TarsId(0) @JvmField val map: Map>, ) : JceStruct @Serializable internal class RequestDataStructSvcReqRegister( - @TarsId(0) @JvmField val struct: SvcReqRegister + @TarsId(0) @JvmField val struct: SvcReqRegister, ) : JceStruct \ No newline at end of file diff --git a/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/RequestPushForceOffline.kt b/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/RequestPushForceOffline.kt index c0682a4f7..6268553ee 100644 --- a/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/RequestPushForceOffline.kt +++ b/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/RequestPushForceOffline.kt @@ -19,5 +19,5 @@ internal class RequestPushForceOffline( @TarsId(0) @JvmField val uin: Long, @TarsId(1) @JvmField val title: String = "", @TarsId(2) @JvmField val tips: String = "", - @TarsId(3) @JvmField val sameDevice: Byte? = null + @TarsId(3) @JvmField val sameDevice: Byte? = null, ) : JceStruct, Packet \ No newline at end of file diff --git a/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/SvcDevLoginInfo.kt b/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/SvcDevLoginInfo.kt index 769c33281..8d66d0347 100644 --- a/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/SvcDevLoginInfo.kt +++ b/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/SvcDevLoginInfo.kt @@ -25,7 +25,7 @@ internal data class SvcDevLoginInfo( // @JvmField @TarsId(7) val stDeviceItemDes: DeviceItemDes? = null, @JvmField @TarsId(8) val iTerType: Long? = null, // 1:windows, 2: mobile, 3: ios @JvmField @TarsId(9) val iProductType: Long? = null, // always 0 - @JvmField @TarsId(10) val iCanBeKicked: Long? = null // isOnline + @JvmField @TarsId(10) val iCanBeKicked: Long? = null, // isOnline ) : JceStruct /* @@ -76,6 +76,6 @@ internal class SvcReqGetDevLoginInfo( @JvmField @TarsId(3) val iTimeStamp: Long, @JvmField @TarsId(4) val iNextItemIndex: Long, @JvmField @TarsId(5) val iRequireMax: Long, - @JvmField @TarsId(6) val iGetDevListType: Long? = 7L // 1: online list 2: recent list? 4: getAuthLoginDevList? + @JvmField @TarsId(6) val iGetDevListType: Long? = 7L, // 1: online list 2: recent list? 4: getAuthLoginDevList? ) : JceStruct diff --git a/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/SvcReqMSFLoginNotifyData.kt b/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/SvcReqMSFLoginNotifyData.kt index b1d8dc407..c3bf10919 100644 --- a/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/SvcReqMSFLoginNotifyData.kt +++ b/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/SvcReqMSFLoginNotifyData.kt @@ -43,5 +43,5 @@ internal data class SvcReqMSFLoginNotifyData( @JvmField @TarsId(5) val info: String? = "", @JvmField @TarsId(6) val iProductType: Long? = null, @JvmField @TarsId(7) val iClientType: Long? = null, - @JvmField @TarsId(8) val vecInstanceList: List? = null + @JvmField @TarsId(8) val vecInstanceList: List? = null, ) : JceStruct diff --git a/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/SvcReqRegister.kt b/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/SvcReqRegister.kt index 9d1ff5990..32783d5a6 100644 --- a/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/SvcReqRegister.kt +++ b/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/SvcReqRegister.kt @@ -50,6 +50,6 @@ internal class SvcReqRegister( @TarsId(33) @JvmField var bytes_0x769_reqbody: ByteArray? = null, @TarsId(34) @JvmField var bIsSetStatus: Byte = 0, @TarsId(35) @JvmField var vecServerBuf: ByteArray? = null, - @TarsId(36) @JvmField var bSetMute: Byte = 0 + @TarsId(36) @JvmField var bSetMute: Byte = 0, // @SerialId(25) var vecBindUin: ArrayList<*>? = null // ?? 未知泛型 ) : JceStruct \ No newline at end of file diff --git a/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/SvcRequestPushReadedNotify.kt b/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/SvcRequestPushReadedNotify.kt index cad35a1f1..6bf129329 100644 --- a/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/SvcRequestPushReadedNotify.kt +++ b/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/SvcRequestPushReadedNotify.kt @@ -20,7 +20,7 @@ internal class SvcRequestPushReadedNotify( @JvmField @TarsId(0) val notifyType: Byte, @JvmField @TarsId(1) val vC2CReadedNotify: List? = null, @JvmField @TarsId(2) val vGroupReadedNotify: List? = null, - @JvmField @TarsId(3) val vDisReadedNotify: List? = null + @JvmField @TarsId(3) val vDisReadedNotify: List? = null, ) : JceStruct @@ -30,7 +30,7 @@ internal class C2CMsgReadedNotify( @JvmField @TarsId(1) val lastReadTime: Long? = null, @JvmField @TarsId(2) val flag: Long? = null, @JvmField @TarsId(3) val phoneNum: String? = "", - @JvmField @TarsId(4) val bindedUin: Long? = null + @JvmField @TarsId(4) val bindedUin: Long? = null, ) : JceStruct @Serializable @@ -38,14 +38,14 @@ internal class DisMsgReadedNotify( @JvmField @TarsId(0) val disUin: Long? = null, @JvmField @TarsId(1) val opType: Long? = null, @JvmField @TarsId(2) val memberSeq: Long? = null, - @JvmField @TarsId(3) val disMsgSeq: Long? = null + @JvmField @TarsId(3) val disMsgSeq: Long? = null, ) : JceStruct @Serializable internal class GPicInfo( @JvmField @TarsId(0) val vPath: ByteArray, - @JvmField @TarsId(1) val vHost: ByteArray? = null + @JvmField @TarsId(1) val vHost: ByteArray? = null, ) : JceStruct @@ -55,7 +55,7 @@ internal class GroupMsgHead( @JvmField @TarsId(1) val totalPkg: Byte, @JvmField @TarsId(2) val curPkg: Byte, @JvmField @TarsId(3) val usPkgSeq: Int, - @JvmField @TarsId(4) val dwReserved: Long + @JvmField @TarsId(4) val dwReserved: Long, ) : JceStruct @Serializable @@ -63,7 +63,7 @@ internal class GroupMsgReadedNotify( @JvmField @TarsId(0) val groupCode: Long? = null, @JvmField @TarsId(1) val opType: Long? = null, @JvmField @TarsId(2) val memberSeq: Long? = null, - @JvmField @TarsId(3) val groupMsgSeq: Long? = null + @JvmField @TarsId(3) val groupMsgSeq: Long? = null, ) : JceStruct @Serializable @@ -89,6 +89,6 @@ internal class RequestPushGroupMsg( @JvmField @TarsId(18) val stGroupMsgHead: GroupMsgHead? = null, @JvmField @TarsId(19) val wUserActive: Int? = null, @JvmField @TarsId(20) val vMarketFace: List? = null, - @JvmField @TarsId(21) val uSuperQQBubbleId: Long? = null + @JvmField @TarsId(21) val uSuperQQBubbleId: Long? = null, ) : JceStruct diff --git a/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/SvcRespRegister.kt b/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/SvcRespRegister.kt index 308d493c7..8f642a261 100644 --- a/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/SvcRespRegister.kt +++ b/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/SvcRespRegister.kt @@ -36,10 +36,10 @@ internal class SvcRespRegister( */ @JvmField @TarsId(14) val largeSeqUpdate: Byte = 0, @JvmField @TarsId(15) val bytes_0x769_rspBody: ByteArray? = null, - @JvmField @TarsId(16) val iStatus: Int? = 0 + @JvmField @TarsId(16) val iStatus: Int? = 0, ) : JceStruct internal fun FriendListCache.isValid(svcRespRegister: SvcRespRegister): Boolean { return svcRespRegister.iLargeSeq == friendListSeq && svcRespRegister.timeStamp == timeStamp -// return this.largeSeqUpdate != 0.toByte() + // return this.largeSeqUpdate != 0.toByte() } \ No newline at end of file diff --git a/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/SvcRspGetDevLoginInfo.kt b/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/SvcRspGetDevLoginInfo.kt index 0f3e2112f..55a84cc08 100644 --- a/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/SvcRspGetDevLoginInfo.kt +++ b/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/SvcRspGetDevLoginInfo.kt @@ -21,6 +21,6 @@ internal class SvcRspGetDevLoginInfo( @JvmField @TarsId(3) val iTotalItemCount: Long, @JvmField @TarsId(4) val vecCurrentLoginDevInfo: List? = null, @JvmField @TarsId(5) val vecHistoryLoginDevInfo: List? = null, - @JvmField @TarsId(6) val vecAuthLoginDevInfo: List? = null + @JvmField @TarsId(6) val vecAuthLoginDevInfo: List? = null, ) : JceStruct diff --git a/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/TroopList.kt b/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/TroopList.kt index 019a6b5a3..b8a00c5a8 100644 --- a/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/TroopList.kt +++ b/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/TroopList.kt @@ -23,7 +23,7 @@ internal class GetTroopListReqV2Simplify( @TarsId(5) @JvmField val shVersion: Int? = null, @TarsId(6) @JvmField val dwCompanyId: Long? = null, @TarsId(7) @JvmField val versionNum: Long? = null, - @TarsId(8) @JvmField val getLongGroupName: Byte? = null + @TarsId(8) @JvmField val getLongGroupName: Byte? = null, ) : JceStruct @Serializable @@ -31,7 +31,7 @@ internal class StTroopNumSimplify( @TarsId(0) @JvmField val groupCode: Long, @TarsId(1) @JvmField val dwGroupInfoSeq: Long? = null, @TarsId(2) @JvmField val dwGroupFlagExt: Long? = null, - @TarsId(3) @JvmField val dwGroupRankSeq: Long? = null + @TarsId(3) @JvmField val dwGroupRankSeq: Long? = null, ) : JceStruct @@ -46,7 +46,7 @@ internal class GetTroopListRespV2( @TarsId(6) @JvmField val vecTroopListDel: List? = null, @TarsId(7) @JvmField val vecTroopRank: List? = null, @TarsId(8) @JvmField val vecFavGroup: List? = null, - @TarsId(9) @JvmField val vecTroopListExt: List? = null + @TarsId(9) @JvmField val vecTroopListExt: List? = null, ) : JceStruct @@ -86,7 +86,7 @@ internal class StTroopNum( @TarsId(31) @JvmField val udwHLGuildAppid: Long? = null, @TarsId(32) @JvmField val udwHLGuildSubType: Long? = null, @TarsId(33) @JvmField val udwCmdUinRingtoneID: Long? = null, - @TarsId(34) @JvmField val udwCmdUinFlagEx2: Long? = null + @TarsId(34) @JvmField val udwCmdUinFlagEx2: Long? = null, ) : JceStruct @Serializable @@ -99,7 +99,7 @@ internal class StGroupRankInfo( @TarsId(5) @JvmField val ownerName: String? = "", @TarsId(6) @JvmField val adminName: String? = "", @TarsId(7) @JvmField val dwOfficeMode: Long? = null, - @TarsId(9) @JvmField val fuckIssue405: List? = null // fake + @TarsId(9) @JvmField val fuckIssue405: List? = null, // fake ) : JceStruct @Serializable @@ -110,13 +110,13 @@ internal class StFavoriteGroup( @TarsId(0) @JvmField val dwGroupCode: Long, @TarsId(1) @JvmField val dwTimestamp: Long? = null, @TarsId(2) @JvmField val dwSnsFlag: Long? = 1L, - @TarsId(3) @JvmField val dwOpenTimestamp: Long? = null + @TarsId(3) @JvmField val dwOpenTimestamp: Long? = null, ) : JceStruct @Serializable internal class StLevelRankPair( @TarsId(0) @JvmField val dwLevel: Long? = null, - @TarsId(1) @JvmField val rank: String? = "" + @TarsId(1) @JvmField val rank: String? = "", ) : JceStruct @Serializable @@ -128,7 +128,7 @@ internal class GetTroopMemberListReq( @TarsId(4) @JvmField val version: Long? = null, @TarsId(5) @JvmField val reqType: Long? = null, @TarsId(6) @JvmField val getListAppointTime: Long? = null, - @TarsId(7) @JvmField val richCardNameVer: Byte? = null + @TarsId(7) @JvmField val richCardNameVer: Byte? = null, ) : JceStruct @@ -142,7 +142,7 @@ internal class GetTroopMemberListResp( @TarsId(5) @JvmField val result: Int, @TarsId(6) @JvmField val errorCode: Short? = null, @TarsId(7) @JvmField val officeMode: Long? = null, - @TarsId(8) @JvmField val nextGetTime: Long? = null + @TarsId(8) @JvmField val nextGetTime: Long? = null, ) : JceStruct @Serializable @@ -185,11 +185,11 @@ internal class StTroopMemberInfo( @TarsId(36) @JvmField val dwBigClubLevel: Long? = null, @TarsId(37) @JvmField val dwBigClubFlag: Long? = null, @TarsId(38) @JvmField val dwNameplate: Long? = null, - @TarsId(39) @JvmField val vecGroupHonor: ByteArray? = null + @TarsId(39) @JvmField val vecGroupHonor: ByteArray? = null, ) : JceStruct @Serializable internal class QzoneUserInfo( @TarsId(0) @JvmField val eStarState: Int? = null, - @TarsId(1) @JvmField val extendInfo: Map? = null + @TarsId(1) @JvmField val extendInfo: Map? = null, ) : JceStruct \ No newline at end of file diff --git a/mirai-core/src/commonMain/kotlin/network/protocol/data/proto/Cmd0x346.kt b/mirai-core/src/commonMain/kotlin/network/protocol/data/proto/Cmd0x346.kt index ec290842f..6f9d19f7e 100644 --- a/mirai-core/src/commonMain/kotlin/network/protocol/data/proto/Cmd0x346.kt +++ b/mirai-core/src/commonMain/kotlin/network/protocol/data/proto/Cmd0x346.kt @@ -21,7 +21,7 @@ internal class Cmd0x346 : ProtoBuf { internal class AddrList( @JvmField @ProtoNumber(2) val strIp: List = emptyList(), @JvmField @ProtoNumber(3) val strDomain: String = "", - @JvmField @ProtoNumber(4) val port: Int = 0 + @JvmField @ProtoNumber(4) val port: Int = 0, ) : ProtoBuf @Serializable @@ -30,7 +30,7 @@ internal class Cmd0x346 : ProtoBuf { @Serializable internal class ApplyCleanTrafficRsp( @JvmField @ProtoNumber(10) val int32RetCode: Int = 0, - @JvmField @ProtoNumber(20) val retMsg: String = "" + @JvmField @ProtoNumber(20) val retMsg: String = "", ) : ProtoBuf @Serializable @@ -45,7 +45,7 @@ internal class Cmd0x346 : ProtoBuf { @JvmField @ProtoNumber(80) val fileSize: Long = 0L, @JvmField @ProtoNumber(90) val fileName: String = "", @JvmField @ProtoNumber(100) val dangerLevel: Int = 0, - @JvmField @ProtoNumber(110) val totalSpace: Long = 0L + @JvmField @ProtoNumber(110) val totalSpace: Long = 0L, ) : ProtoBuf @Serializable @@ -53,7 +53,7 @@ internal class Cmd0x346 : ProtoBuf { @JvmField @ProtoNumber(10) val int32RetCode: Int = 0, @JvmField @ProtoNumber(20) val retMsg: String = "", @JvmField @ProtoNumber(30) val uuid: ByteArray = EMPTY_BYTE_ARRAY, - @JvmField @ProtoNumber(40) val totalSpace: Long = 0L + @JvmField @ProtoNumber(40) val totalSpace: Long = 0L, ) : ProtoBuf @Serializable @@ -65,27 +65,27 @@ internal class Cmd0x346 : ProtoBuf { @JvmField @ProtoNumber(50) val fileSize: Long = 0L, @JvmField @ProtoNumber(60) val fileName: String = "", @JvmField @ProtoNumber(70) val localFilepath: String = "", - @JvmField @ProtoNumber(80) val uuid: ByteArray = EMPTY_BYTE_ARRAY + @JvmField @ProtoNumber(80) val uuid: ByteArray = EMPTY_BYTE_ARRAY, ) : ProtoBuf @Serializable internal class ApplyCopyToRsp( @JvmField @ProtoNumber(10) val int32RetCode: Int = 0, @JvmField @ProtoNumber(20) val retMsg: String = "", - @JvmField @ProtoNumber(30) val fileKey: String = "" + @JvmField @ProtoNumber(30) val fileKey: String = "", ) : ProtoBuf @Serializable internal class ApplyDownloadAbsReq( @JvmField @ProtoNumber(10) val uin: Long = 0L, - @JvmField @ProtoNumber(20) val uuid: ByteArray = EMPTY_BYTE_ARRAY + @JvmField @ProtoNumber(20) val uuid: ByteArray = EMPTY_BYTE_ARRAY, ) : ProtoBuf @Serializable internal class ApplyDownloadAbsRsp( @JvmField @ProtoNumber(10) val int32RetCode: Int = 0, @JvmField @ProtoNumber(20) val retMsg: String = "", - @JvmField @ProtoNumber(30) val msgDownloadInfo: Cmd0x346.DownloadInfo? = null + @JvmField @ProtoNumber(30) val msgDownloadInfo: Cmd0x346.DownloadInfo? = null, ) : ProtoBuf @Serializable @@ -94,7 +94,7 @@ internal class Cmd0x346 : ProtoBuf { @JvmField @ProtoNumber(20) val uuid: ByteArray = EMPTY_BYTE_ARRAY, @JvmField @ProtoNumber(30) val ownerType: Int = 0, @JvmField @ProtoNumber(500) val extUintype: Int = 0, - @JvmField @ProtoNumber(501) val needHttpsUrl: Int = 0 + @JvmField @ProtoNumber(501) val needHttpsUrl: Int = 0, ) : ProtoBuf @Serializable @@ -102,7 +102,7 @@ internal class Cmd0x346 : ProtoBuf { @JvmField @ProtoNumber(10) val int32RetCode: Int = 0, @JvmField @ProtoNumber(20) val retMsg: String = "", @JvmField @ProtoNumber(30) val msgDownloadInfo: Cmd0x346.DownloadInfo? = null, - @JvmField @ProtoNumber(40) val msgFileInfo: Cmd0x346.FileInfo? = null + @JvmField @ProtoNumber(40) val msgFileInfo: Cmd0x346.FileInfo? = null, ) : ProtoBuf @Serializable @@ -111,7 +111,7 @@ internal class Cmd0x346 : ProtoBuf { @JvmField @ProtoNumber(20) val recverUin: Long = 0L, @JvmField @ProtoNumber(30) val uuid: ByteArray = EMPTY_BYTE_ARRAY, @JvmField @ProtoNumber(40) val dangerLevel: Int = 0, - @JvmField @ProtoNumber(50) val totalSpace: Long = 0L + @JvmField @ProtoNumber(50) val totalSpace: Long = 0L, ) : ProtoBuf @Serializable @@ -120,7 +120,7 @@ internal class Cmd0x346 : ProtoBuf { @JvmField @ProtoNumber(20) val retMsg: String = "", @JvmField @ProtoNumber(30) val totalSpace: Long = 0L, @JvmField @ProtoNumber(40) val usedSpace: Long = 0L, - @JvmField @ProtoNumber(50) val uuid: ByteArray = EMPTY_BYTE_ARRAY + @JvmField @ProtoNumber(50) val uuid: ByteArray = EMPTY_BYTE_ARRAY, ) : ProtoBuf @Serializable @@ -133,14 +133,14 @@ internal class Cmd0x346 : ProtoBuf { @JvmField @ProtoNumber(30) val useFileSize: Long = 0L, @JvmField @ProtoNumber(40) val useFileNum: Int = 0, @JvmField @ProtoNumber(50) val allFileSize: Long = 0L, - @JvmField @ProtoNumber(60) val allFileNum: Int = 0 + @JvmField @ProtoNumber(60) val allFileNum: Int = 0, ) : ProtoBuf @Serializable internal class ApplyListDownloadReq( @JvmField @ProtoNumber(10) val uin: Long = 0L, @JvmField @ProtoNumber(20) val beginIndex: Int = 0, - @JvmField @ProtoNumber(30) val reqCount: Int = 0 + @JvmField @ProtoNumber(30) val reqCount: Int = 0, ) : ProtoBuf @Serializable @@ -151,7 +151,7 @@ internal class Cmd0x346 : ProtoBuf { @JvmField @ProtoNumber(40) val beginIndex: Int = 0, @JvmField @ProtoNumber(50) val rspCount: Int = 0, @JvmField @ProtoNumber(60) val isEnd: Int = 0, - @JvmField @ProtoNumber(70) val msgFileList: List = emptyList() + @JvmField @ProtoNumber(70) val msgFileList: List = emptyList(), ) : ProtoBuf @Serializable @@ -163,7 +163,7 @@ internal class Cmd0x346 : ProtoBuf { @JvmField @ProtoNumber(50) val _10mMd5: ByteArray = EMPTY_BYTE_ARRAY, @JvmField @ProtoNumber(60) val localFilepath: String = "", @JvmField @ProtoNumber(70) val dangerLevel: Int = 0, - @JvmField @ProtoNumber(80) val totalSpace: Long = 0L + @JvmField @ProtoNumber(80) val totalSpace: Long = 0L, ) : ProtoBuf @Serializable @@ -177,7 +177,7 @@ internal class Cmd0x346 : ProtoBuf { @JvmField @ProtoNumber(70) val sha: ByteArray = EMPTY_BYTE_ARRAY, @JvmField @ProtoNumber(80) val localFilepath: String = "", @JvmField @ProtoNumber(90) val dangerLevel: Int = 0, - @JvmField @ProtoNumber(100) val totalSpace: Long = 0L + @JvmField @ProtoNumber(100) val totalSpace: Long = 0L, ) : ProtoBuf @Serializable @@ -190,7 +190,7 @@ internal class Cmd0x346 : ProtoBuf { @JvmField @ProtoNumber(60) val sha: ByteArray = EMPTY_BYTE_ARRAY, @JvmField @ProtoNumber(70) val localFilepath: String = "", @JvmField @ProtoNumber(80) val dangerLevel: Int = 0, - @JvmField @ProtoNumber(90) val totalSpace: Long = 0L + @JvmField @ProtoNumber(90) val totalSpace: Long = 0L, ) : ProtoBuf @Serializable @@ -204,7 +204,7 @@ internal class Cmd0x346 : ProtoBuf { @JvmField @ProtoNumber(70) val uploadKey: ByteArray = EMPTY_BYTE_ARRAY, @JvmField @ProtoNumber(80) val totalSpace: Long = 0L, @JvmField @ProtoNumber(90) val usedSpace: Long = 0L, - @JvmField @ProtoNumber(100) val uploadDns: String = "" + @JvmField @ProtoNumber(100) val uploadDns: String = "", ) : ProtoBuf @Serializable @@ -220,7 +220,7 @@ internal class Cmd0x346 : ProtoBuf { @JvmField @ProtoNumber(90) val usedSpace: Long = 0L, @JvmField @ProtoNumber(100) val uploadHttpsPort: Int = 443, @JvmField @ProtoNumber(110) val uploadHttpsDomain: String = "", - @JvmField @ProtoNumber(120) val uploadDns: String = "" + @JvmField @ProtoNumber(120) val uploadDns: String = "", ) : ProtoBuf @Serializable @@ -234,7 +234,7 @@ internal class Cmd0x346 : ProtoBuf { @JvmField @ProtoNumber(70) val uploadKey: ByteArray = EMPTY_BYTE_ARRAY, @JvmField @ProtoNumber(80) val totalSpace: Long = 0L, @JvmField @ProtoNumber(90) val usedSpace: Long = 0L, - @JvmField @ProtoNumber(100) val uploadDns: String = "" + @JvmField @ProtoNumber(100) val uploadDns: String = "", ) : ProtoBuf @Serializable @@ -247,7 +247,7 @@ internal class Cmd0x346 : ProtoBuf { @JvmField @ProtoNumber(60) val _10mMd5: ByteArray = EMPTY_BYTE_ARRAY, @JvmField @ProtoNumber(70) val localFilepath: String = "", @JvmField @ProtoNumber(80) val dangerLevel: Int = 0, - @JvmField @ProtoNumber(90) val totalSpace: Long = 0L + @JvmField @ProtoNumber(90) val totalSpace: Long = 0L, ) : ProtoBuf @Serializable @@ -260,7 +260,7 @@ internal class Cmd0x346 : ProtoBuf { @JvmField @ProtoNumber(60) val _3sha: ByteArray = EMPTY_BYTE_ARRAY, @JvmField @ProtoNumber(70) val localFilepath: String = "", @JvmField @ProtoNumber(80) val dangerLevel: Int = 0, - @JvmField @ProtoNumber(90) val totalSpace: Long = 0L + @JvmField @ProtoNumber(90) val totalSpace: Long = 0L, ) : ProtoBuf @Serializable @@ -273,7 +273,7 @@ internal class Cmd0x346 : ProtoBuf { @JvmField @ProtoNumber(60) val sha: ByteArray = EMPTY_BYTE_ARRAY, @JvmField @ProtoNumber(70) val localFilepath: String = "", @JvmField @ProtoNumber(80) val dangerLevel: Int = 0, - @JvmField @ProtoNumber(90) val totalSpace: Long = 0L + @JvmField @ProtoNumber(90) val totalSpace: Long = 0L, ) : ProtoBuf @Serializable @@ -291,7 +291,7 @@ internal class Cmd0x346 : ProtoBuf { @JvmField @ProtoNumber(110) val boolFileExist: Boolean = false, @JvmField @ProtoNumber(120) val packSize: Int = 0, @JvmField @ProtoNumber(130) val strUploadipList: List = emptyList(), - @JvmField @ProtoNumber(140) val uploadDns: String = "" + @JvmField @ProtoNumber(140) val uploadDns: String = "", ) : ProtoBuf @Serializable @@ -314,7 +314,7 @@ internal class Cmd0x346 : ProtoBuf { @JvmField @ProtoNumber(142) val uploadHttpsPort: Int = 443, @JvmField @ProtoNumber(143) val uploadHttpsDomain: String = "", @JvmField @ProtoNumber(150) val uploadDns: String = "", - @JvmField @ProtoNumber(160) val uploadLanip: String = "" + @JvmField @ProtoNumber(160) val uploadLanip: String = "", ) : ProtoBuf @Serializable @@ -335,7 +335,7 @@ internal class Cmd0x346 : ProtoBuf { @JvmField @ProtoNumber(140) val uploadHttpsPort: Int = 443, @JvmField @ProtoNumber(150) val uploadHttpsDomain: String = "", @JvmField @ProtoNumber(160) val uploadDns: String = "", - @JvmField @ProtoNumber(170) val uploadLanip: String = "" + @JvmField @ProtoNumber(170) val uploadLanip: String = "", ) : ProtoBuf @Serializable @@ -343,13 +343,13 @@ internal class Cmd0x346 : ProtoBuf { @JvmField @ProtoNumber(10) val uin: Long = 0L, @JvmField @ProtoNumber(20) val peerUin: Long = 0L, @JvmField @ProtoNumber(30) val deleteType: Int = 0, - @JvmField @ProtoNumber(40) val uuid: ByteArray = EMPTY_BYTE_ARRAY + @JvmField @ProtoNumber(40) val uuid: ByteArray = EMPTY_BYTE_ARRAY, ) : ProtoBuf @Serializable internal class DeleteFileRsp( @JvmField @ProtoNumber(10) val int32RetCode: Int = 0, - @JvmField @ProtoNumber(20) val retMsg: String = "" + @JvmField @ProtoNumber(20) val retMsg: String = "", ) : ProtoBuf @Serializable @@ -358,7 +358,7 @@ internal class Cmd0x346 : ProtoBuf { @JvmField @ProtoNumber(2) val uinReceiver: Long = 0L, @JvmField @ProtoNumber(10) val msgTime: Int = 0, @JvmField @ProtoNumber(20) val msgRandom: Int = 0, - @JvmField @ProtoNumber(30) val msgSeqNo: Int = 0 + @JvmField @ProtoNumber(30) val msgSeqNo: Int = 0, ) : ProtoBuf @Serializable @@ -372,20 +372,20 @@ internal class Cmd0x346 : ProtoBuf { @JvmField @ProtoNumber(70) val cookie: String = "", @JvmField @ProtoNumber(80) val httpsPort: Int = 443, @JvmField @ProtoNumber(90) val httpsDownloadDomain: String = "", - @JvmField @ProtoNumber(110) val downloadDns: String = "" + @JvmField @ProtoNumber(110) val downloadDns: String = "", ) : ProtoBuf @Serializable internal class DownloadSuccReq( @JvmField @ProtoNumber(10) val uin: Long = 0L, - @JvmField @ProtoNumber(20) val uuid: ByteArray = EMPTY_BYTE_ARRAY + @JvmField @ProtoNumber(20) val uuid: ByteArray = EMPTY_BYTE_ARRAY, ) : ProtoBuf @Serializable internal class DownloadSuccRsp( @JvmField @ProtoNumber(10) val int32RetCode: Int = 0, @JvmField @ProtoNumber(20) val retMsg: String = "", - @JvmField @ProtoNumber(30) val int32DownStat: Int = 0 + @JvmField @ProtoNumber(30) val int32DownStat: Int = 0, ) : ProtoBuf @Serializable @@ -406,7 +406,7 @@ internal class Cmd0x346 : ProtoBuf { @JvmField @ProtoNumber(90800) val pttTime: Int = 0, @JvmField @ProtoNumber(90900) val bdhCmdid: Int = 0, @JvmField @ProtoNumber(91000) val reqTransferType: Int = 0, - @JvmField @ProtoNumber(91100) val isAuto: Int = 0 + @JvmField @ProtoNumber(91100) val isAuto: Int = 0, ) : ProtoBuf @Serializable @@ -414,7 +414,7 @@ internal class Cmd0x346 : ProtoBuf { @JvmField @ProtoNumber(1) val transferType: Int = 0, @JvmField @ProtoNumber(2) val channelType: Int = 0, @JvmField @ProtoNumber(3) val allowRetry: Int = 0, - @JvmField @ProtoNumber(4) val serverAddrIpv6List: Cmd0x346.AddrList? = null + @JvmField @ProtoNumber(4) val serverAddrIpv6List: Cmd0x346.AddrList? = null, ) : ProtoBuf @Serializable @@ -432,39 +432,39 @@ internal class Cmd0x346 : ProtoBuf { @JvmField @ProtoNumber(110) val clientType: Int = 0, @JvmField @ProtoNumber(120) val ownerUin: Long = 0L, @JvmField @ProtoNumber(121) val peerUin: Long = 0L, - @JvmField @ProtoNumber(130) val expireTime: Int = 0 + @JvmField @ProtoNumber(130) val expireTime: Int = 0, ) : ProtoBuf @Serializable internal class FileQueryReq( @JvmField @ProtoNumber(10) val uin: Long = 0L, - @JvmField @ProtoNumber(20) val uuid: ByteArray = EMPTY_BYTE_ARRAY + @JvmField @ProtoNumber(20) val uuid: ByteArray = EMPTY_BYTE_ARRAY, ) : ProtoBuf @Serializable internal class FileQueryRsp( @JvmField @ProtoNumber(10) val int32RetCode: Int = 0, @JvmField @ProtoNumber(20) val retMsg: String = "", - @JvmField @ProtoNumber(30) val msgFileInfo: Cmd0x346.FileInfo? = null + @JvmField @ProtoNumber(30) val msgFileInfo: Cmd0x346.FileInfo? = null, ) : ProtoBuf @Serializable internal class RecallFileReq( @JvmField @ProtoNumber(1) val uin: Long = 0L, - @JvmField @ProtoNumber(2) val uuid: ByteArray = EMPTY_BYTE_ARRAY + @JvmField @ProtoNumber(2) val uuid: ByteArray = EMPTY_BYTE_ARRAY, ) : ProtoBuf @Serializable internal class RecallFileRsp( @JvmField @ProtoNumber(1) val int32RetCode: Int = 0, - @JvmField @ProtoNumber(2) val retMsg: String = "" + @JvmField @ProtoNumber(2) val retMsg: String = "", ) : ProtoBuf @Serializable internal class RecvListQueryReq( @JvmField @ProtoNumber(1) val uin: Long = 0L, @JvmField @ProtoNumber(2) val beginIndex: Int = 0, - @JvmField @ProtoNumber(3) val reqCount: Int = 0 + @JvmField @ProtoNumber(3) val reqCount: Int = 0, ) : ProtoBuf @Serializable @@ -475,20 +475,20 @@ internal class Cmd0x346 : ProtoBuf { @JvmField @ProtoNumber(4) val beginIndex: Int = 0, @JvmField @ProtoNumber(5) val rspFileCount: Int = 0, @JvmField @ProtoNumber(6) val isEnd: Int = 0, - @JvmField @ProtoNumber(7) val msgFileList: List = emptyList() + @JvmField @ProtoNumber(7) val msgFileList: List = emptyList(), ) : ProtoBuf @Serializable internal class RenewFileReq( @JvmField @ProtoNumber(1) val uin: Long = 0L, @JvmField @ProtoNumber(2) val uuid: ByteArray = EMPTY_BYTE_ARRAY, - @JvmField @ProtoNumber(3) val addTtl: Int = 0 + @JvmField @ProtoNumber(3) val addTtl: Int = 0, ) : ProtoBuf @Serializable internal class RenewFileRsp( @JvmField @ProtoNumber(1) val int32RetCode: Int = 0, - @JvmField @ProtoNumber(2) val retMsg: String = "" + @JvmField @ProtoNumber(2) val retMsg: String = "", ) : ProtoBuf @Serializable @@ -519,7 +519,7 @@ internal class Cmd0x346 : ProtoBuf { @JvmField @ProtoNumber(90000) val msgApplyCopyToReq: Cmd0x346.ApplyCopyToReq? = null, @JvmField @ProtoNumber(90001) val msgApplyCleanTrafficReq: Cmd0x346.ApplyCleanTrafficReq? = null, @JvmField @ProtoNumber(90002) val msgApplyGetTrafficReq: Cmd0x346.ApplyGetTrafficReq? = null, - @JvmField @ProtoNumber(99999) val msgExtensionReq: Cmd0x346.ExtensionReq? = null + @JvmField @ProtoNumber(99999) val msgExtensionReq: Cmd0x346.ExtensionReq? = null, ) : ProtoBuf @Serializable @@ -548,14 +548,14 @@ internal class Cmd0x346 : ProtoBuf { @JvmField @ProtoNumber(90000) val msgApplyCopyToRsp: Cmd0x346.ApplyCopyToRsp? = null, @JvmField @ProtoNumber(90001) val msgApplyCleanTrafficRsp: Cmd0x346.ApplyCleanTrafficRsp? = null, @JvmField @ProtoNumber(90002) val msgApplyGetTrafficRsp: Cmd0x346.ApplyGetTrafficRsp? = null, - @JvmField @ProtoNumber(99999) val msgExtensionRsp: Cmd0x346.ExtensionRsp? = null + @JvmField @ProtoNumber(99999) val msgExtensionRsp: Cmd0x346.ExtensionRsp? = null, ) : ProtoBuf @Serializable internal class SendListQueryReq( @JvmField @ProtoNumber(1) val uin: Long = 0L, @JvmField @ProtoNumber(2) val beginIndex: Int = 0, - @JvmField @ProtoNumber(3) val reqCount: Int = 0 + @JvmField @ProtoNumber(3) val reqCount: Int = 0, ) : ProtoBuf @Serializable @@ -568,21 +568,21 @@ internal class Cmd0x346 : ProtoBuf { @JvmField @ProtoNumber(6) val isEnd: Int = 0, @JvmField @ProtoNumber(7) val totLimit: Long = 0L, @JvmField @ProtoNumber(8) val usedLimit: Long = 0L, - @JvmField @ProtoNumber(9) val msgFileList: List = emptyList() + @JvmField @ProtoNumber(9) val msgFileList: List = emptyList(), ) : ProtoBuf @Serializable internal class UploadSuccReq( @JvmField @ProtoNumber(10) val senderUin: Long = 0L, @JvmField @ProtoNumber(20) val recverUin: Long = 0L, - @JvmField @ProtoNumber(30) val uuid: ByteArray = EMPTY_BYTE_ARRAY + @JvmField @ProtoNumber(30) val uuid: ByteArray = EMPTY_BYTE_ARRAY, ) : ProtoBuf @Serializable internal class UploadSuccRsp( @JvmField @ProtoNumber(10) val int32RetCode: Int = 0, @JvmField @ProtoNumber(20) val retMsg: String = "", - @JvmField @ProtoNumber(30) val msgFileInfo: Cmd0x346.FileInfo? = null + @JvmField @ProtoNumber(30) val msgFileInfo: Cmd0x346.FileInfo? = null, ) : ProtoBuf } \ No newline at end of file diff --git a/mirai-core/src/commonMain/kotlin/network/protocol/data/proto/Cmd0x352.kt b/mirai-core/src/commonMain/kotlin/network/protocol/data/proto/Cmd0x352.kt index f95c74333..a80ff28f1 100644 --- a/mirai-core/src/commonMain/kotlin/network/protocol/data/proto/Cmd0x352.kt +++ b/mirai-core/src/commonMain/kotlin/network/protocol/data/proto/Cmd0x352.kt @@ -26,14 +26,14 @@ internal class Cmd0x352 : ProtoBuf { @ProtoNumber(6) @JvmField val buildVer: ByteArray = EMPTY_BYTE_ARRAY, @ProtoNumber(7) @JvmField val fileResid: ByteArray = EMPTY_BYTE_ARRAY, @ProtoNumber(8) @JvmField val picWidth: Int = 0, - @ProtoNumber(9) @JvmField val picHeight: Int = 0 + @ProtoNumber(9) @JvmField val picHeight: Int = 0, ) : ProtoBuf @Serializable internal class DelImgRsp( @ProtoNumber(1) @JvmField val result: Int = 0, @ProtoNumber(2) @JvmField val failMsg: ByteArray = EMPTY_BYTE_ARRAY, - @ProtoNumber(3) @JvmField val fileResid: ByteArray = EMPTY_BYTE_ARRAY + @ProtoNumber(3) @JvmField val fileResid: ByteArray = EMPTY_BYTE_ARRAY, ) : ProtoBuf @Serializable @@ -51,7 +51,7 @@ internal class Cmd0x352 : ProtoBuf { @ProtoNumber(12) @JvmField val buType: Int = 0, @ProtoNumber(13) @JvmField val buildVer: ByteArray = EMPTY_BYTE_ARRAY, @ProtoNumber(14) @JvmField val picUpTimestamp: Int = 0, - @ProtoNumber(15) @JvmField val reqTransferType: Int = 0 + @ProtoNumber(15) @JvmField val reqTransferType: Int = 0, ) : ProtoBuf @Serializable @@ -73,7 +73,7 @@ internal class Cmd0x352 : ProtoBuf { @ProtoNumber(15) @JvmField val bigThumbDownPara: ByteArray = EMPTY_BYTE_ARRAY, @ProtoNumber(16) @JvmField val httpsUrlFlag: Int = 0, @ProtoNumber(26) @JvmField val msgDownIp6: List = emptyList(), - @ProtoNumber(27) @JvmField val clientIp6: ByteArray = EMPTY_BYTE_ARRAY + @ProtoNumber(27) @JvmField val clientIp6: ByteArray = EMPTY_BYTE_ARRAY, ) : ProtoBuf @Suppress("ArrayInDataClass") @@ -85,22 +85,22 @@ internal class Cmd0x352 : ProtoBuf { @ProtoNumber(4) @JvmField val fileWidth: Int = 0, @ProtoNumber(5) @JvmField val fileHeight: Int = 0, @ProtoNumber(6) @JvmField val fileFlag: Long = 0L, - @ProtoNumber(7) @JvmField val fileCutPos: Int = 0 + @ProtoNumber(7) @JvmField val fileCutPos: Int = 0, ) : ProtoBuf @Serializable internal class IPv6Info( @ProtoNumber(1) @JvmField val ip6: ByteArray = EMPTY_BYTE_ARRAY, - @ProtoNumber(2) @JvmField val port: Int = 0 + @ProtoNumber(2) @JvmField val port: Int = 0, ) : ProtoBuf @Serializable internal class ReqBody( @ProtoNumber(1) @JvmField val subcmd: Int = 0, //2是GetImgUrlReq 1是UploadImgReq - @ProtoNumber(2) @JvmField val msgTryupImgReq: List = emptyList(),// optional - @ProtoNumber(3) @JvmField val msgGetimgUrlReq: List = emptyList(),// optional + @ProtoNumber(2) @JvmField val msgTryupImgReq: List = emptyList(), // optional + @ProtoNumber(3) @JvmField val msgGetimgUrlReq: List = emptyList(), // optional @ProtoNumber(4) @JvmField val msgDelImgReq: List = emptyList(), - @ProtoNumber(10) @JvmField val netType: Int = 0// 数据网络=5, wifi=3 + @ProtoNumber(10) @JvmField val netType: Int = 0, // 数据网络=5, wifi=3 ) : ProtoBuf @Serializable @@ -110,24 +110,24 @@ internal class Cmd0x352 : ProtoBuf { @ProtoNumber(3) @JvmField val msgGetimgUrlRsp: List = emptyList(), @ProtoNumber(4) @JvmField val boolNewBigchan: Boolean = false, @ProtoNumber(5) @JvmField val msgDelImgRsp: List = emptyList(), - @ProtoNumber(10) @JvmField val failMsg: String? = "" + @ProtoNumber(10) @JvmField val failMsg: String? = "", ) : ProtoBuf @Serializable internal class TryUpImgReq( @ProtoNumber(1) @JvmField val srcUin: Long, @ProtoNumber(2) @JvmField val dstUin: Long, - @ProtoNumber(3) @JvmField val fileId: Long = 0L,//从0开始的自增数?貌似有一个连接就要自增1, 但是又会重置回0 + @ProtoNumber(3) @JvmField val fileId: Long = 0L, //从0开始的自增数?貌似有一个连接就要自增1, 但是又会重置回0 @ProtoNumber(4) @JvmField val fileMd5: ByteArray, - @ProtoNumber(5) @JvmField val fileSize: Long,//默认为md5+".jpg" + @ProtoNumber(5) @JvmField val fileSize: Long, //默认为md5+".jpg" @ProtoNumber(6) @JvmField val fileName: String, @ProtoNumber(7) @JvmField val srcTerm: Int = 5, @ProtoNumber(8) @JvmField val platformType: Int = 9, @ProtoNumber(9) @JvmField val innerIP: Int = 0, - @ProtoNumber(10) @JvmField val addressBook: Boolean = false,//chatType == 1006为true 我觉得发false没问题 - @ProtoNumber(11) @JvmField val retry: Int = 0,//default - @ProtoNumber(12) @JvmField val buType: Int = 1,//1或96 不确定 - @ProtoNumber(13) @JvmField val imgOriginal: Boolean = false,//是否为原图 + @ProtoNumber(10) @JvmField val addressBook: Boolean = false, //chatType == 1006为true 我觉得发false没问题 + @ProtoNumber(11) @JvmField val retry: Int = 0, //default + @ProtoNumber(12) @JvmField val buType: Int = 1, //1或96 不确定 + @ProtoNumber(13) @JvmField val imgOriginal: Boolean = false, //是否为原图 @ProtoNumber(14) @JvmField val imgWidth: Int = 0, @ProtoNumber(15) @JvmField val imgHeight: Int = 0, /** @@ -141,13 +141,13 @@ internal class Cmd0x352 : ProtoBuf { * SHARPP: 1004 */ @ProtoNumber(16) @JvmField val imgType: Int = 1000, - @ProtoNumber(17) @JvmField val buildVer: String = "8.2.7.4410",//版本号 - @ProtoNumber(18) @JvmField val fileIndex: ByteArray = EMPTY_BYTE_ARRAY,//default - @ProtoNumber(19) @JvmField val fileStoreDays: Int = 0,//default - @ProtoNumber(20) @JvmField val stepFlag: Int = 0,//default - @ProtoNumber(21) @JvmField val rejectTryFast: Boolean = false,//bool - @ProtoNumber(22) @JvmField val srvUpload: Int = 1,//typeHotPic[1/2/3] - @ProtoNumber(23) @JvmField val transferUrl: ByteArray = EMPTY_BYTE_ARRAY//rawDownloadUrl, 如果没有就是EMPTY_BYTE_ARRAY + @ProtoNumber(17) @JvmField val buildVer: String = "8.2.7.4410", //版本号 + @ProtoNumber(18) @JvmField val fileIndex: ByteArray = EMPTY_BYTE_ARRAY, //default + @ProtoNumber(19) @JvmField val fileStoreDays: Int = 0, //default + @ProtoNumber(20) @JvmField val stepFlag: Int = 0, //default + @ProtoNumber(21) @JvmField val rejectTryFast: Boolean = false, //bool + @ProtoNumber(22) @JvmField val srvUpload: Int = 1, //typeHotPic[1/2/3] + @ProtoNumber(23) @JvmField val transferUrl: ByteArray = EMPTY_BYTE_ARRAY, //rawDownloadUrl, 如果没有就是EMPTY_BYTE_ARRAY ) : ImgReq @Serializable @@ -175,7 +175,7 @@ internal class Cmd0x352 : ProtoBuf { @ProtoNumber(64) @JvmField val bigDownPara: ByteArray = EMPTY_BYTE_ARRAY, @ProtoNumber(65) @JvmField val bigThumbDownPara: ByteArray = EMPTY_BYTE_ARRAY, @ProtoNumber(66) @JvmField val httpsUrlFlag: Int = 0, - @ProtoNumber(1001) @JvmField val msgInfo4busi: TryUpInfo4Busi? = null + @ProtoNumber(1001) @JvmField val msgInfo4busi: TryUpInfo4Busi? = null, ) : ProtoBuf @Serializable @@ -184,6 +184,6 @@ internal class Cmd0x352 : ProtoBuf { @ProtoNumber(2) @JvmField val downDomain: ByteArray = EMPTY_BYTE_ARRAY, @ProtoNumber(3) @JvmField val thumbDownUrl: ByteArray = EMPTY_BYTE_ARRAY, @ProtoNumber(4) @JvmField val originalDownUrl: ByteArray = EMPTY_BYTE_ARRAY, - @ProtoNumber(5) @JvmField val bigDownUrl: ByteArray = EMPTY_BYTE_ARRAY + @ProtoNumber(5) @JvmField val bigDownUrl: ByteArray = EMPTY_BYTE_ARRAY, ) : ProtoBuf } \ No newline at end of file diff --git a/mirai-core/src/commonMain/kotlin/network/protocol/data/proto/Cmd0x388.kt b/mirai-core/src/commonMain/kotlin/network/protocol/data/proto/Cmd0x388.kt index 3e9e2ea88..a55553bdc 100644 --- a/mirai-core/src/commonMain/kotlin/network/protocol/data/proto/Cmd0x388.kt +++ b/mirai-core/src/commonMain/kotlin/network/protocol/data/proto/Cmd0x388.kt @@ -17,7 +17,7 @@ import net.mamoe.mirai.utils.EMPTY_BYTE_ARRAY @Serializable internal class Cmd0x388 : ProtoBuf { @Serializable -internal class DelImgReq( + internal class DelImgReq( @ProtoNumber(1) @JvmField val srcUin: Long = 0L, @ProtoNumber(2) @JvmField val dstUin: Long = 0L, @ProtoNumber(3) @JvmField val reqTerm: Int = 0, @@ -26,40 +26,40 @@ internal class DelImgReq( @ProtoNumber(6) @JvmField val buildVer: ByteArray = EMPTY_BYTE_ARRAY, @ProtoNumber(7) @JvmField val fileResid: ByteArray = EMPTY_BYTE_ARRAY, @ProtoNumber(8) @JvmField val picWidth: Int = 0, - @ProtoNumber(9) @JvmField val picHeight: Int = 0 + @ProtoNumber(9) @JvmField val picHeight: Int = 0, ) : ProtoBuf @Serializable -internal class DelImgRsp( + internal class DelImgRsp( @ProtoNumber(1) @JvmField val result: Int = 0, @ProtoNumber(2) @JvmField val failMsg: ByteArray = EMPTY_BYTE_ARRAY, - @ProtoNumber(3) @JvmField val fileResid: ByteArray = EMPTY_BYTE_ARRAY + @ProtoNumber(3) @JvmField val fileResid: ByteArray = EMPTY_BYTE_ARRAY, ) : ProtoBuf @Serializable -internal class ExpRoamExtendInfo( - @ProtoNumber(1) @JvmField val resid: ByteArray = EMPTY_BYTE_ARRAY + internal class ExpRoamExtendInfo( + @ProtoNumber(1) @JvmField val resid: ByteArray = EMPTY_BYTE_ARRAY, ) : ProtoBuf @Serializable -internal class ExpRoamPicInfo( + internal class ExpRoamPicInfo( @ProtoNumber(1) @JvmField val shopFlag: Int = 0, @ProtoNumber(2) @JvmField val pkgId: Int = 0, - @ProtoNumber(3) @JvmField val picId: ByteArray = EMPTY_BYTE_ARRAY + @ProtoNumber(3) @JvmField val picId: ByteArray = EMPTY_BYTE_ARRAY, ) : ProtoBuf @Serializable -internal class ExtensionCommPicTryUp( - @ProtoNumber(1) @JvmField val bytesExtinfo: List = emptyList() + internal class ExtensionCommPicTryUp( + @ProtoNumber(1) @JvmField val bytesExtinfo: List = emptyList(), ) : ProtoBuf @Serializable -internal class ExtensionExpRoamTryUp( - @ProtoNumber(1) @JvmField val msgExproamPicInfo: List = emptyList() + internal class ExtensionExpRoamTryUp( + @ProtoNumber(1) @JvmField val msgExproamPicInfo: List = emptyList(), ) : ProtoBuf @Serializable -internal class GetImgUrlReq( + internal class GetImgUrlReq( @ProtoNumber(1) @JvmField val groupCode: Long = 0L, @ProtoNumber(2) @JvmField val dstUin: Long = 0L, @ProtoNumber(3) @JvmField val fileid: Long = 0L, @@ -79,11 +79,11 @@ internal class GetImgUrlReq( @ProtoNumber(17) @JvmField val fileWidth: Int = 0, @ProtoNumber(18) @JvmField val picType: Int = 0, @ProtoNumber(19) @JvmField val picUpTimestamp: Int = 0, - @ProtoNumber(20) @JvmField val reqTransferType: Int = 0 + @ProtoNumber(20) @JvmField val reqTransferType: Int = 0, ) : ProtoBuf @Serializable -internal class GetImgUrlRsp( + internal class GetImgUrlRsp( @ProtoNumber(1) @JvmField val fileid: Long = 0L, @ProtoNumber(2) @JvmField val fileMd5: ByteArray = EMPTY_BYTE_ARRAY, @ProtoNumber(3) @JvmField val result: Int = 0, @@ -104,11 +104,11 @@ internal class GetImgUrlRsp( @ProtoNumber(19) @JvmField val bigThumbDownPara: ByteArray = EMPTY_BYTE_ARRAY, @ProtoNumber(20) @JvmField val httpsUrlFlag: Int = 0, @ProtoNumber(26) @JvmField val msgDownIp6: List = emptyList(), - @ProtoNumber(27) @JvmField val clientIp6: ByteArray = EMPTY_BYTE_ARRAY + @ProtoNumber(27) @JvmField val clientIp6: ByteArray = EMPTY_BYTE_ARRAY, ) : ProtoBuf @Serializable -internal class GetPttUrlReq( + internal class GetPttUrlReq( @ProtoNumber(1) @JvmField val groupCode: Long = 0L, @ProtoNumber(2) @JvmField val dstUin: Long = 0L, @ProtoNumber(3) @JvmField val fileid: Long = 0L, @@ -123,11 +123,11 @@ internal class GetPttUrlReq( @ProtoNumber(12) @JvmField val codec: Int = 0, @ProtoNumber(13) @JvmField val buId: Int = 0, @ProtoNumber(14) @JvmField val reqTransferType: Int = 0, - @ProtoNumber(15) @JvmField val isAuto: Int = 0 + @ProtoNumber(15) @JvmField val isAuto: Int = 0, ) : ProtoBuf @Serializable -internal class GetPttUrlRsp( + internal class GetPttUrlRsp( @ProtoNumber(1) @JvmField val fileid: Long = 0L, @ProtoNumber(2) @JvmField val fileMd5: ByteArray = EMPTY_BYTE_ARRAY, @ProtoNumber(3) @JvmField val result: Int = 0, @@ -142,17 +142,17 @@ internal class GetPttUrlRsp( @ProtoNumber(12) @JvmField val allowRetry: Int = 0, @ProtoNumber(26) @JvmField val msgDownIp6: List = emptyList(), @ProtoNumber(27) @JvmField val clientIp6: ByteArray = EMPTY_BYTE_ARRAY, - @ProtoNumber(28) @JvmField val strDomain: String = "" + @ProtoNumber(28) @JvmField val strDomain: String = "", ) : ProtoBuf @Suppress("ArrayInDataClass") @Serializable -internal class ImgInfo( + internal class ImgInfo( @ProtoNumber(1) @JvmField val fileMd5: ByteArray = EMPTY_BYTE_ARRAY, @ProtoNumber(2) @JvmField val fileType: Int = 0, @ProtoNumber(3) @JvmField val fileSize: Long = 0L, @ProtoNumber(4) @JvmField val fileWidth: Int = 0, - @ProtoNumber(5) @JvmField val fileHeight: Int = 0 + @ProtoNumber(5) @JvmField val fileHeight: Int = 0, ) : ProtoBuf { override fun toString(): String { return "ImgInfo(fileMd5=${fileMd5.contentToString()}, fileType=$fileType, fileSize=$fileSize, fileWidth=$fileWidth, fileHeight=$fileHeight)" @@ -160,20 +160,20 @@ internal class ImgInfo( } @Serializable -internal class IPv6Info( + internal class IPv6Info( @ProtoNumber(1) @JvmField val ip6: ByteArray = EMPTY_BYTE_ARRAY, - @ProtoNumber(2) @JvmField val port: Int = 0 + @ProtoNumber(2) @JvmField val port: Int = 0, ) : ProtoBuf @Serializable -internal class PicSize( + internal class PicSize( @ProtoNumber(1) @JvmField val original: Int = 0, @ProtoNumber(2) @JvmField val thumb: Int = 0, - @ProtoNumber(3) @JvmField val high: Int = 0 + @ProtoNumber(3) @JvmField val high: Int = 0, ) : ProtoBuf @Serializable -internal class ReqBody( + internal class ReqBody( @ProtoNumber(1) @JvmField val netType: Int = 0, @ProtoNumber(2) @JvmField val subcmd: Int = 0, @ProtoNumber(3) @JvmField val msgTryupImgReq: List = emptyList(), @@ -182,22 +182,22 @@ internal class ReqBody( @ProtoNumber(6) @JvmField val msgGetpttUrlReq: List = emptyList(), @ProtoNumber(7) @JvmField val commandId: Int = 0, @ProtoNumber(8) @JvmField val msgDelImgReq: List = emptyList(), - @ProtoNumber(1001) @JvmField val extension: ByteArray = EMPTY_BYTE_ARRAY + @ProtoNumber(1001) @JvmField val extension: ByteArray = EMPTY_BYTE_ARRAY, ) : ProtoBuf @Serializable -internal class RspBody( + internal class RspBody( @ProtoNumber(1) @JvmField val clientIp: Int = 0, @ProtoNumber(2) @JvmField val subcmd: Int = 0, @ProtoNumber(3) @JvmField val msgTryupImgRsp: List = emptyList(), @ProtoNumber(4) @JvmField val msgGetimgUrlRsp: List = emptyList(), @ProtoNumber(5) @JvmField val msgTryupPttRsp: List = emptyList(), @ProtoNumber(6) @JvmField val msgGetpttUrlRsp: List = emptyList(), - @ProtoNumber(7) @JvmField val msgDelImgRsp: List = emptyList() + @ProtoNumber(7) @JvmField val msgDelImgRsp: List = emptyList(), ) : ProtoBuf @Serializable -internal class TryUpImgReq( + internal class TryUpImgReq( @ProtoNumber(1) @JvmField val groupCode: Long = 0L, @ProtoNumber(2) @JvmField val srcUin: Long = 0L, @ProtoNumber(3) @JvmField val fileId: Long = 0L, @@ -224,11 +224,11 @@ internal class TryUpImgReq( @ProtoNumber(17) @JvmField val fileIndex: ByteArray = EMPTY_BYTE_ARRAY, @ProtoNumber(18) @JvmField val dstUin: Long = 0L, @ProtoNumber(19) @JvmField val srvUpload: Int = 0, - @ProtoNumber(20) @JvmField val transferUrl: ByteArray = EMPTY_BYTE_ARRAY + @ProtoNumber(20) @JvmField val transferUrl: ByteArray = EMPTY_BYTE_ARRAY, ) : ImgReq @Serializable -internal class TryUpImgRsp( + internal class TryUpImgRsp( @ProtoNumber(1) @JvmField val fileId: Long = 0L, @ProtoNumber(2) @JvmField val result: Int = 0, @ProtoNumber(3) @JvmField val failMsg: String = "", @@ -243,20 +243,20 @@ internal class TryUpImgRsp( @ProtoNumber(12) @JvmField val boolNewBigChan: Boolean = false, @ProtoNumber(26) @JvmField val msgUpIp6: List = emptyList(), @ProtoNumber(27) @JvmField val clientIp6: ByteArray = EMPTY_BYTE_ARRAY, - @ProtoNumber(1001) @JvmField val msgInfo4busi: TryUpInfo4Busi? = null + @ProtoNumber(1001) @JvmField val msgInfo4busi: TryUpInfo4Busi? = null, ) : ProtoBuf @Serializable -internal class TryUpInfo4Busi( + internal class TryUpInfo4Busi( @ProtoNumber(1) @JvmField val downDomain: ByteArray = EMPTY_BYTE_ARRAY, @ProtoNumber(2) @JvmField val thumbDownUrl: ByteArray = EMPTY_BYTE_ARRAY, @ProtoNumber(3) @JvmField val originalDownUrl: ByteArray = EMPTY_BYTE_ARRAY, @ProtoNumber(4) @JvmField val bigDownUrl: ByteArray = EMPTY_BYTE_ARRAY, - @ProtoNumber(5) @JvmField val fileResid: ByteArray = EMPTY_BYTE_ARRAY + @ProtoNumber(5) @JvmField val fileResid: ByteArray = EMPTY_BYTE_ARRAY, ) : ProtoBuf @Serializable -internal class TryUpPttReq( + internal class TryUpPttReq( @ProtoNumber(1) @JvmField val groupCode: Long = 0L, @ProtoNumber(2) @JvmField val srcUin: Long = 0L, @ProtoNumber(3) @JvmField val fileId: Long = 0L, @@ -272,11 +272,11 @@ internal class TryUpPttReq( @ProtoNumber(13) @JvmField val boolNewUpChan: Boolean = false, @ProtoNumber(14) @JvmField val codec: Int = 0, @ProtoNumber(15) @JvmField val voiceType: Int = 0, - @ProtoNumber(16) @JvmField val buId: Int = 0 + @ProtoNumber(16) @JvmField val buId: Int = 0, ) : ProtoBuf @Serializable -internal class TryUpPttRsp( + internal class TryUpPttRsp( @ProtoNumber(1) @JvmField val fileId: Long = 0L, @ProtoNumber(2) @JvmField val result: Int = 0, @ProtoNumber(3) @JvmField val failMsg: ByteArray? = null, @@ -290,6 +290,6 @@ internal class TryUpPttRsp( @ProtoNumber(11) @JvmField val fileKey: ByteArray = EMPTY_BYTE_ARRAY, @ProtoNumber(12) @JvmField val channelType: Int = 0, @ProtoNumber(26) @JvmField val msgUpIp6: List = emptyList(), - @ProtoNumber(27) @JvmField val clientIp6: ByteArray = EMPTY_BYTE_ARRAY + @ProtoNumber(27) @JvmField val clientIp6: ByteArray = EMPTY_BYTE_ARRAY, ) : ProtoBuf } \ No newline at end of file diff --git a/mirai-core/src/commonMain/kotlin/network/protocol/data/proto/Cmd0x857.kt b/mirai-core/src/commonMain/kotlin/network/protocol/data/proto/Cmd0x857.kt index 36276dd5f..33859b3fb 100644 --- a/mirai-core/src/commonMain/kotlin/network/protocol/data/proto/Cmd0x857.kt +++ b/mirai-core/src/commonMain/kotlin/network/protocol/data/proto/Cmd0x857.kt @@ -28,7 +28,7 @@ internal class GroupOpenSysMsg : ProtoBuf { @ProtoNumber(5) @JvmField val ver: String = "", @ProtoNumber(6) @JvmField val meta: String = "", @ProtoNumber(7) @JvmField val config: String = "", - @ProtoNumber(8) @JvmField val source: Source? = null + @ProtoNumber(8) @JvmField val source: Source? = null, ) : ProtoBuf @Serializable @@ -38,7 +38,7 @@ internal class GroupOpenSysMsg : ProtoBuf { @ProtoNumber(3) @JvmField val brief: String = "", @ProtoNumber(4) @JvmField val cover: String = "", @ProtoNumber(5) @JvmField val url: String = "", - @ProtoNumber(6) @JvmField val source: Source? = null + @ProtoNumber(6) @JvmField val source: Source? = null, ) : ProtoBuf @Serializable @@ -46,14 +46,14 @@ internal class GroupOpenSysMsg : ProtoBuf { @ProtoNumber(1) @JvmField val uin: Long = 0L, @ProtoNumber(2) @JvmField val nick: String = "", @ProtoNumber(3) @JvmField val avatar: String = "", - @ProtoNumber(4) @JvmField val url: String = "" + @ProtoNumber(4) @JvmField val url: String = "", ) : ProtoBuf @Serializable internal class Source( @ProtoNumber(1) @JvmField val name: String = "", @ProtoNumber(2) @JvmField val icon: String = "", - @ProtoNumber(3) @JvmField val url: String = "" + @ProtoNumber(3) @JvmField val url: String = "", ) : ProtoBuf @Serializable @@ -64,7 +64,7 @@ internal class GroupOpenSysMsg : ProtoBuf { @ProtoNumber(4) @JvmField val msgType: Int = 0, @ProtoNumber(5) @JvmField val content: String = "", @ProtoNumber(6) @JvmField val richMsg: RichMsg? = null, - @ProtoNumber(7) @JvmField val lightApp: LightApp? = null + @ProtoNumber(7) @JvmField val lightApp: LightApp? = null, ) : ProtoBuf } @@ -78,7 +78,7 @@ internal class TroopTips0x857 : ProtoBuf { @ProtoNumber(4) @JvmField val optBytesBrief: ByteArray = EMPTY_BYTE_ARRAY, @ProtoNumber(5) @JvmField val receiverUin: Long = 0L, @ProtoNumber(6) @JvmField val reliaoAdminOpt: Int = 0, - @ProtoNumber(7) @JvmField val robotGroupOpt: Int = 0 + @ProtoNumber(7) @JvmField val robotGroupOpt: Int = 0, ) : ProtoBuf @Serializable @@ -90,12 +90,12 @@ internal class TroopTips0x857 : ProtoBuf { @ProtoNumber(5) @JvmField val optBytesData: ByteArray = EMPTY_BYTE_ARRAY, @ProtoNumber(6) @JvmField val optBytesDataI: ByteArray = EMPTY_BYTE_ARRAY, @ProtoNumber(7) @JvmField val optBytesDataA: ByteArray = EMPTY_BYTE_ARRAY, - @ProtoNumber(8) @JvmField val optBytesDataP: ByteArray = EMPTY_BYTE_ARRAY + @ProtoNumber(8) @JvmField val optBytesDataP: ByteArray = EMPTY_BYTE_ARRAY, ) : ProtoBuf @Serializable internal class FloatedTipsInfo( - @ProtoNumber(1) @JvmField val optBytesContent: ByteArray = EMPTY_BYTE_ARRAY + @ProtoNumber(1) @JvmField val optBytesContent: ByteArray = EMPTY_BYTE_ARRAY, ) : ProtoBuf @Serializable @@ -109,7 +109,7 @@ internal class TroopTips0x857 : ProtoBuf { @ProtoNumber(7) @JvmField val msgTemplParam: List = emptyList(), @ProtoNumber(8) @JvmField val content: ByteArray = EMPTY_BYTE_ARRAY, @ProtoNumber(10) @JvmField val tipsSeqId: Long = 0L, - @ProtoNumber(100) @JvmField val pbReserv: ByteArray = EMPTY_BYTE_ARRAY + @ProtoNumber(100) @JvmField val pbReserv: ByteArray = EMPTY_BYTE_ARRAY, ) : ProtoBuf @Serializable @@ -122,25 +122,25 @@ internal class TroopTips0x857 : ProtoBuf { @ProtoNumber(6) @JvmField val interval: Int = 0, @ProtoNumber(7) @JvmField val finish: Int = 0, @ProtoNumber(8) @JvmField val uin: List = emptyList(), - @ProtoNumber(9) @JvmField val action: Int = 0 + @ProtoNumber(9) @JvmField val action: Int = 0, ) : ProtoBuf @Serializable internal class GroupInfoChange( - @ProtoNumber(1) @JvmField val groupHonorSwitch: Int = 0 + @ProtoNumber(1) @JvmField val groupHonorSwitch: Int = 0, ) : ProtoBuf @Serializable internal class GroupNotifyInfo( @ProtoNumber(1) @JvmField val optUint32AutoPullFlag: Int = 0, - @ProtoNumber(2) @JvmField val optBytesFeedsId: ByteArray = EMPTY_BYTE_ARRAY + @ProtoNumber(2) @JvmField val optBytesFeedsId: ByteArray = EMPTY_BYTE_ARRAY, ) : ProtoBuf @Serializable internal class InstCtrl( @ProtoNumber(1) @JvmField val msgSendToInst: List = emptyList(), @ProtoNumber(2) @JvmField val msgExcludeInst: List = emptyList(), - @ProtoNumber(3) @JvmField val msgFromInst: InstInfo? = null + @ProtoNumber(3) @JvmField val msgFromInst: InstInfo? = null, ) : ProtoBuf @Serializable @@ -153,7 +153,7 @@ internal class TroopTips0x857 : ProtoBuf { @ProtoNumber(6) @JvmField val ssoBid: Int = 0, @ProtoNumber(7) @JvmField val guid: ByteArray = EMPTY_BYTE_ARRAY, @ProtoNumber(8) @JvmField val verMin: Int = 0, - @ProtoNumber(9) @JvmField val verMax: Int = 0 + @ProtoNumber(9) @JvmField val verMax: Int = 0, ) : ProtoBuf @Serializable @@ -167,12 +167,12 @@ internal class TroopTips0x857 : ProtoBuf { @ProtoNumber(7) @JvmField val msgSeq: Long = 0L, @ProtoNumber(8) @JvmField val joinNums: Int = 0, @ProtoNumber(99) @JvmField val pushType: Int = 0, - @ProtoNumber(100) @JvmField val extInfo: ByteArray = EMPTY_BYTE_ARRAY + @ProtoNumber(100) @JvmField val extInfo: ByteArray = EMPTY_BYTE_ARRAY, ) : ProtoBuf @Serializable internal class LuckyBagNotify( - @ProtoNumber(1) @JvmField val msgTips: ByteArray = EMPTY_BYTE_ARRAY + @ProtoNumber(1) @JvmField val msgTips: ByteArray = EMPTY_BYTE_ARRAY, ) : ProtoBuf @Serializable @@ -188,13 +188,13 @@ internal class TroopTips0x857 : ProtoBuf { @ProtoNumber(9) @JvmField val msgPerSetting: PersonalSetting? = null, @ProtoNumber(10) @JvmField val playMode: Int = 0, @ProtoNumber(99) @JvmField val mediaType: Int = 0, - @ProtoNumber(100) @JvmField val extInfo: ByteArray = EMPTY_BYTE_ARRAY + @ProtoNumber(100) @JvmField val extInfo: ByteArray = EMPTY_BYTE_ARRAY, ) : ProtoBuf { @Serializable internal class PersonalSetting( @ProtoNumber(1) @JvmField val themeId: Int = 0, @ProtoNumber(2) @JvmField val playerId: Int = 0, - @ProtoNumber(3) @JvmField val fontId: Int = 0 + @ProtoNumber(3) @JvmField val fontId: Int = 0, ) : ProtoBuf } @@ -202,7 +202,7 @@ internal class TroopTips0x857 : ProtoBuf { internal class MessageBoxInfo( @ProtoNumber(1) @JvmField val optBytesContent: ByteArray = EMPTY_BYTE_ARRAY, @ProtoNumber(2) @JvmField val optBytesTitle: ByteArray = EMPTY_BYTE_ARRAY, - @ProtoNumber(3) @JvmField val optBytesButton: ByteArray = EMPTY_BYTE_ARRAY + @ProtoNumber(3) @JvmField val optBytesButton: ByteArray = EMPTY_BYTE_ARRAY, ) : ProtoBuf @Serializable @@ -213,7 +213,7 @@ internal class TroopTips0x857 : ProtoBuf { @ProtoNumber(4) @JvmField val reminderContent: ByteArray = EMPTY_BYTE_ARRAY, @ProtoNumber(5) @JvmField val userdef: ByteArray = EMPTY_BYTE_ARRAY, @ProtoNumber(6) @JvmField val groupType: Int = 0, - @ProtoNumber(7) @JvmField val opType: Int = 0 + @ProtoNumber(7) @JvmField val opType: Int = 0, ) : ProtoBuf { @Serializable internal class MessageMeta( @@ -222,13 +222,13 @@ internal class TroopTips0x857 : ProtoBuf { @ProtoNumber(3) @JvmField val msgRandom: Int = 0, @ProtoNumber(4) @JvmField val msgType: Int = 0, @ProtoNumber(5) @JvmField val msgFlag: Int = 0, - @ProtoNumber(6) @JvmField val authorUin: Long = 0L + @ProtoNumber(6) @JvmField val authorUin: Long = 0L, ) : ProtoBuf } @Serializable internal class MiniAppNotify( - @ProtoNumber(1) @JvmField val msg: ByteArray = EMPTY_BYTE_ARRAY + @ProtoNumber(1) @JvmField val msg: ByteArray = EMPTY_BYTE_ARRAY, ) : ProtoBuf @Serializable @@ -260,14 +260,14 @@ internal class TroopTips0x857 : ProtoBuf { @ProtoNumber(27) @JvmField val optMsgVideoPush: VideoChangePushInfo? = null, @ProtoNumber(28) @JvmField val optLbsShareChangePlusInfo: LbsShareChangePushInfo? = null, @ProtoNumber(29) @JvmField val optMsgSingPush: SingChangePushInfo? = null, - @ProtoNumber(30) @JvmField val optMsgGroupInfoChange: GroupInfoChange? = null + @ProtoNumber(30) @JvmField val optMsgGroupInfoChange: GroupInfoChange? = null, ) : ProtoBuf @Serializable internal class NotifyObjmsgUpdate( @ProtoNumber(1) @JvmField val objmsgId: ByteArray = EMPTY_BYTE_ARRAY, @ProtoNumber(2) @JvmField val updateType: Int = 0, - @ProtoNumber(3) @JvmField val extMsg: ByteArray = EMPTY_BYTE_ARRAY + @ProtoNumber(3) @JvmField val extMsg: ByteArray = EMPTY_BYTE_ARRAY, ) : ProtoBuf @Serializable @@ -290,7 +290,7 @@ internal class TroopTips0x857 : ProtoBuf { @ProtoNumber(16) @JvmField val idiom: ByteArray = EMPTY_BYTE_ARRAY, @ProtoNumber(17) @JvmField val idiomSeq: Int = 0, @ProtoNumber(18) @JvmField val idiomAlpha: ByteArray = EMPTY_BYTE_ARRAY, - @ProtoNumber(19) @JvmField val jumpurl: ByteArray = EMPTY_BYTE_ARRAY + @ProtoNumber(19) @JvmField val jumpurl: ByteArray = EMPTY_BYTE_ARRAY, ) : ProtoBuf @Serializable @@ -300,12 +300,12 @@ internal class TroopTips0x857 : ProtoBuf { @ProtoNumber(3) @JvmField val optUint32Offline: Int = 0, @ProtoNumber(4) @JvmField val msgInstCtrl: InstCtrl? = null, @ProtoNumber(5) @JvmField val optBytesMsg: ByteArray = EMPTY_BYTE_ARRAY, - @ProtoNumber(6) @JvmField val optUint32BusiType: Int = 0 + @ProtoNumber(6) @JvmField val optUint32BusiType: Int = 0, ) : ProtoBuf @Serializable internal class RspBody( - @ProtoNumber(1) @JvmField val optUint64GroupCode: Long = 0L + @ProtoNumber(1) @JvmField val optUint64GroupCode: Long = 0L, ) : ProtoBuf @Serializable @@ -315,13 +315,13 @@ internal class TroopTips0x857 : ProtoBuf { @ProtoNumber(3) @JvmField val groupId: Long = 0L, @ProtoNumber(4) @JvmField val operUin: Long = 0L, @ProtoNumber(5) @JvmField val grayTips: ByteArray = EMPTY_BYTE_ARRAY, - @ProtoNumber(6) @JvmField val joinNums: Int = 0 + @ProtoNumber(6) @JvmField val joinNums: Int = 0, ) : ProtoBuf @Serializable internal class TemplParam( @ProtoNumber(1) @JvmField val name: ByteArray = EMPTY_BYTE_ARRAY, - @ProtoNumber(2) @JvmField val value: ByteArray = EMPTY_BYTE_ARRAY + @ProtoNumber(2) @JvmField val value: ByteArray = EMPTY_BYTE_ARRAY, ) : ProtoBuf @Serializable @@ -330,7 +330,7 @@ internal class TroopTips0x857 : ProtoBuf { @ProtoNumber(2) @JvmField val feedsId: ByteArray = EMPTY_BYTE_ARRAY, @ProtoNumber(3) @JvmField val themeName: ByteArray = EMPTY_BYTE_ARRAY, @ProtoNumber(4) @JvmField val actionUin: Long = 0L, - @ProtoNumber(5) @JvmField val createUin: Long = 0L + @ProtoNumber(5) @JvmField val createUin: Long = 0L, ) : ProtoBuf @Serializable @@ -339,7 +339,7 @@ internal class TroopTips0x857 : ProtoBuf { @ProtoNumber(2) @JvmField val creatorUin: Long = 0L, @ProtoNumber(3) @JvmField val richContent: ByteArray = EMPTY_BYTE_ARRAY, @ProtoNumber(4) @JvmField val optBytesUrl: ByteArray = EMPTY_BYTE_ARRAY, - @ProtoNumber(5) @JvmField val creatorNick: ByteArray = EMPTY_BYTE_ARRAY + @ProtoNumber(5) @JvmField val creatorNick: ByteArray = EMPTY_BYTE_ARRAY, ) : ProtoBuf @Serializable @@ -350,7 +350,7 @@ internal class TroopTips0x857 : ProtoBuf { @ProtoNumber(4) @JvmField val operUin: Long = 0L, @ProtoNumber(5) @JvmField val grayTips: ByteArray = EMPTY_BYTE_ARRAY, @ProtoNumber(6) @JvmField val joinNums: Int = 0, - @ProtoNumber(100) @JvmField val extInfo: ByteArray = EMPTY_BYTE_ARRAY + @ProtoNumber(100) @JvmField val extInfo: ByteArray = EMPTY_BYTE_ARRAY, ) : ProtoBuf @Serializable @@ -371,14 +371,14 @@ internal class TroopTips0x857 : ProtoBuf { @ProtoNumber(14) @JvmField val timeoutSec: Int = 0, @ProtoNumber(15) @JvmField val killConfirmed: Int = 0, @ProtoNumber(16) @JvmField val judgeNickname: ByteArray = EMPTY_BYTE_ARRAY, - @ProtoNumber(17) @JvmField val votedTieUsers: List = emptyList() + @ProtoNumber(17) @JvmField val votedTieUsers: List = emptyList(), ) : ProtoBuf { @Serializable internal class GameRecord( @ProtoNumber(1) @JvmField val total: Int = 0, @ProtoNumber(2) @JvmField val win: Int = 0, @ProtoNumber(3) @JvmField val lose: Int = 0, - @ProtoNumber(4) @JvmField val draw: Int = 0 + @ProtoNumber(4) @JvmField val draw: Int = 0, ) : ProtoBuf @Serializable @@ -402,7 +402,7 @@ internal class TroopTips0x857 : ProtoBuf { @ProtoNumber(17) @JvmField val msgGameRecord: GameRecord? = null, @ProtoNumber(18) @JvmField val isWerewolf: Int = 0, @ProtoNumber(19) @JvmField val defendedUser: Long = 0L, - @ProtoNumber(20) @JvmField val isSheriff: Int = 0 + @ProtoNumber(20) @JvmField val isSheriff: Int = 0, ) : ProtoBuf } } \ No newline at end of file diff --git a/mirai-core/src/commonMain/kotlin/network/protocol/data/proto/Cmd0x858.kt b/mirai-core/src/commonMain/kotlin/network/protocol/data/proto/Cmd0x858.kt index 1d70000b2..1af907bf5 100644 --- a/mirai-core/src/commonMain/kotlin/network/protocol/data/proto/Cmd0x858.kt +++ b/mirai-core/src/commonMain/kotlin/network/protocol/data/proto/Cmd0x858.kt @@ -21,7 +21,7 @@ import net.mamoe.mirai.utils.EMPTY_BYTE_ARRAY @Serializable internal class Oidb0x858 : ProtoBuf { @Serializable -internal class GoldMsgTipsElem( + internal class GoldMsgTipsElem( @ProtoNumber(1) @JvmField val type: Int = 0, @ProtoNumber(2) @JvmField val billno: String = "", @ProtoNumber(3) @JvmField val result: Int = 0, @@ -30,27 +30,27 @@ internal class GoldMsgTipsElem( @ProtoNumber(6) @JvmField val interval: Int = 0, @ProtoNumber(7) @JvmField val finish: Int = 0, @ProtoNumber(8) @JvmField val uin: List = emptyList(), - @ProtoNumber(9) @JvmField val action: Int = 0 + @ProtoNumber(9) @JvmField val action: Int = 0, ) : ProtoBuf @Serializable -internal class MessageRecallReminder( + internal class MessageRecallReminder( @ProtoNumber(1) @JvmField val uin: Long = 0L, @ProtoNumber(2) @JvmField val nickname: ByteArray = EMPTY_BYTE_ARRAY, @ProtoNumber(3) @JvmField val recalledMsgList: List = emptyList(), @ProtoNumber(4) @JvmField val reminderContent: ByteArray = EMPTY_BYTE_ARRAY, - @ProtoNumber(5) @JvmField val userdef: ByteArray = EMPTY_BYTE_ARRAY + @ProtoNumber(5) @JvmField val userdef: ByteArray = EMPTY_BYTE_ARRAY, ) : ProtoBuf { @Serializable -internal class MessageMeta( + internal class MessageMeta( @ProtoNumber(1) @JvmField val seq: Int = 0, @ProtoNumber(2) @JvmField val time: Int = 0, - @ProtoNumber(3) @JvmField val msgRandom: Int = 0 + @ProtoNumber(3) @JvmField val msgRandom: Int = 0, ) : ProtoBuf } @Serializable -internal class NotifyMsgBody( + internal class NotifyMsgBody( @ProtoNumber(1) @JvmField val optEnumType: Int /* enum */ = 5, @ProtoNumber(2) @JvmField val optUint64MsgTime: Long = 0L, @ProtoNumber(3) @JvmField val optUint64MsgExpires: Long = 0L, @@ -60,18 +60,18 @@ internal class NotifyMsgBody( @ProtoNumber(7) @JvmField val optMsgObjUpdate: NotifyObjmsgUpdate? = null, // @SerialId(8) @JvmField val optStcmGameState: ApolloGameStatus.STCMGameMessage? = null, // @SerialId(9) @JvmField val aplloMsgPush: ApolloPushMsgInfo.STPushMsgElem? = null, - @ProtoNumber(10) @JvmField val optMsgGoldtips: GoldMsgTipsElem? = null + @ProtoNumber(10) @JvmField val optMsgGoldtips: GoldMsgTipsElem? = null, ) : ProtoBuf @Serializable -internal class NotifyObjmsgUpdate( + internal class NotifyObjmsgUpdate( @ProtoNumber(1) @JvmField val objmsgId: ByteArray = EMPTY_BYTE_ARRAY, @ProtoNumber(2) @JvmField val updateType: Int = 0, - @ProtoNumber(3) @JvmField val extMsg: ByteArray = EMPTY_BYTE_ARRAY + @ProtoNumber(3) @JvmField val extMsg: ByteArray = EMPTY_BYTE_ARRAY, ) : ProtoBuf @Serializable -internal class RedGrayTipsInfo( + internal class RedGrayTipsInfo( @ProtoNumber(1) @JvmField val optUint32ShowLastest: Int = 0, @ProtoNumber(2) @JvmField val senderUin: Long = 0L, @ProtoNumber(3) @JvmField val receiverUin: Long = 0L, @@ -90,6 +90,6 @@ internal class RedGrayTipsInfo( @ProtoNumber(16) @JvmField val idiom: ByteArray = EMPTY_BYTE_ARRAY, @ProtoNumber(17) @JvmField val idiomSeq: Int = 0, @ProtoNumber(18) @JvmField val idiomAlpha: ByteArray = EMPTY_BYTE_ARRAY, - @ProtoNumber(19) @JvmField val jumpurl: ByteArray = EMPTY_BYTE_ARRAY + @ProtoNumber(19) @JvmField val jumpurl: ByteArray = EMPTY_BYTE_ARRAY, ) : ProtoBuf } diff --git a/mirai-core/src/commonMain/kotlin/network/protocol/data/proto/Define.kt b/mirai-core/src/commonMain/kotlin/network/protocol/data/proto/Define.kt index 5b43d767b..f02971b92 100644 --- a/mirai-core/src/commonMain/kotlin/network/protocol/data/proto/Define.kt +++ b/mirai-core/src/commonMain/kotlin/network/protocol/data/proto/Define.kt @@ -20,7 +20,7 @@ internal class Common : ProtoBuf { @ProtoNumber(1) @JvmField val friUin: Long = 0L, @ProtoNumber(2) @JvmField val friNick: String = "", @ProtoNumber(3) @JvmField val time: Long = 0L, - @ProtoNumber(4) @JvmField val bindStatus: Int = 0 + @ProtoNumber(4) @JvmField val bindStatus: Int = 0, ) : ProtoBuf @Serializable @@ -57,7 +57,7 @@ internal class Common : ProtoBuf { @ProtoNumber(59) @JvmField val fromuinLevel: Int = 0, @ProtoNumber(60) @JvmField val unread: Int = 0, @ProtoNumber(61) @JvmField val unread2: Int = 0, - @ProtoNumber(62) @JvmField val unread3: Int = 0 + @ProtoNumber(62) @JvmField val unread3: Int = 0, ) : ProtoBuf @Serializable @@ -66,7 +66,7 @@ internal class Common : ProtoBuf { @ProtoNumber(32) @JvmField val int32TaskValue: Int = 0, @ProtoNumber(33) @JvmField val tarValue: Int = 0, @ProtoNumber(34) @JvmField val tarValueLevel2: Int = 0, - @ProtoNumber(35) @JvmField val tarValueLevel3: Int = 0 + @ProtoNumber(35) @JvmField val tarValueLevel3: Int = 0, ) : ProtoBuf } @@ -82,12 +82,12 @@ internal class AppointDefine : ProtoBuf { @ProtoNumber(6) @JvmField val publishTime: Int = 0, @ProtoNumber(7) @JvmField val msgHotTopicList: HotTopicList? = null, @ProtoNumber(8) @JvmField val moreUrl: String = "", - @ProtoNumber(9) @JvmField val recordDuration: String = "" + @ProtoNumber(9) @JvmField val recordDuration: String = "", ) : ProtoBuf @Serializable internal class RichText( - @ProtoNumber(1) @JvmField val msgElems: List = emptyList() + @ProtoNumber(1) @JvmField val msgElems: List = emptyList(), ) : ProtoBuf @Serializable @@ -96,13 +96,13 @@ internal class AppointDefine : ProtoBuf { @ProtoNumber(2) @JvmField val notifytype: Int = 0, @ProtoNumber(3) @JvmField val eventtime: Int = 0, @ProtoNumber(4) @JvmField val seq: Int = 0, - @ProtoNumber(5) @JvmField val notifyTips: String = "" + @ProtoNumber(5) @JvmField val notifyTips: String = "", ) : ProtoBuf @Serializable internal class Wifi( @ProtoNumber(1) @JvmField val mac: Long = 0L, - @ProtoNumber(2) @JvmField val int32Rssi: Int = 0 + @ProtoNumber(2) @JvmField val int32Rssi: Int = 0, ) : ProtoBuf @Serializable @@ -118,13 +118,13 @@ internal class AppointDefine : ProtoBuf { @ProtoNumber(9) @JvmField val addTime: Int = 0, @ProtoNumber(10) @JvmField val tagCategory: String = "", @ProtoNumber(11) @JvmField val tagOtherUrl: String = "", - @ProtoNumber(12) @JvmField val bid: Int = 0 + @ProtoNumber(12) @JvmField val bid: Int = 0, ) : ProtoBuf @Serializable internal class ShopID( @ProtoNumber(1) @JvmField val shopid: String = "", - @ProtoNumber(2) @JvmField val sp: Int = 0 + @ProtoNumber(2) @JvmField val sp: Int = 0, ) : ProtoBuf @Serializable @@ -136,14 +136,14 @@ internal class AppointDefine : ProtoBuf { @ProtoNumber(6) @JvmField val msgReplyInfo: ReplyInfo? = null, @ProtoNumber(7) @JvmField val flag: Int = 0, @ProtoNumber(8) @JvmField val msgContent: RichText? = null, - @ProtoNumber(9) @JvmField val hot: Int = 0 + @ProtoNumber(9) @JvmField val hot: Int = 0, ) : ProtoBuf @Serializable internal class ADFeed( @ProtoNumber(1) @JvmField val taskId: Int = 0, @ProtoNumber(2) @JvmField val style: Int = 0, - @ProtoNumber(3) @JvmField val content: ByteArray = EMPTY_BYTE_ARRAY + @ProtoNumber(3) @JvmField val content: ByteArray = EMPTY_BYTE_ARRAY, ) : ProtoBuf @Serializable @@ -152,27 +152,27 @@ internal class AppointDefine : ProtoBuf { @ProtoNumber(2) @JvmField val int32Mnc: Int = -1, @ProtoNumber(3) @JvmField val int32Lac: Int = -1, @ProtoNumber(4) @JvmField val int32Cellid: Int = -1, - @ProtoNumber(5) @JvmField val int32Rssi: Int = 0 + @ProtoNumber(5) @JvmField val int32Rssi: Int = 0, ) : ProtoBuf @Serializable internal class RecentVistorEvent( @ProtoNumber(1) @JvmField val eventtype: Int = 0, @ProtoNumber(2) @JvmField val eventTinyid: Long = 0L, - @ProtoNumber(3) @JvmField val unreadCount: Int = 0 + @ProtoNumber(3) @JvmField val unreadCount: Int = 0, ) : ProtoBuf @Serializable internal class OrganizerInfo( @ProtoNumber(1) @JvmField val hostName: String = "", @ProtoNumber(2) @JvmField val hostUrl: String = "", - @ProtoNumber(3) @JvmField val hostCover: String = "" + @ProtoNumber(3) @JvmField val hostCover: String = "", ) : ProtoBuf @Serializable internal class InterestTag( @ProtoNumber(1) @JvmField val tagType: Int = 0, - @ProtoNumber(2) @JvmField val msgTagList: List = emptyList() + @ProtoNumber(2) @JvmField val msgTagList: List = emptyList(), ) : ProtoBuf @Serializable @@ -184,7 +184,7 @@ internal class AppointDefine : ProtoBuf { @ProtoNumber(5) @JvmField val showPublisher: Int = 0, @ProtoNumber(6) @JvmField val detailPicUrl: String = "", @ProtoNumber(7) @JvmField val detailUrl: String = "", - @ProtoNumber(8) @JvmField val showAttend: Int = 0 + @ProtoNumber(8) @JvmField val showAttend: Int = 0, ) : ProtoBuf @Serializable @@ -195,7 +195,7 @@ internal class AppointDefine : ProtoBuf { @ProtoNumber(4) @JvmField val time: Int = 0, @ProtoNumber(6) @JvmField val msgReplyInfo: ReplyInfo? = null, @ProtoNumber(7) @JvmField val flag: Int = 0, - @ProtoNumber(8) @JvmField val msgContent: RichText? = null + @ProtoNumber(8) @JvmField val msgContent: RichText? = null, ) : ProtoBuf @Serializable @@ -206,7 +206,7 @@ internal class AppointDefine : ProtoBuf { @ProtoNumber(4) @JvmField val appointGender: Int = 0, @ProtoNumber(5) @JvmField val appointIntroduce: String = "", @ProtoNumber(6) @JvmField val msgAppointAddress: AddressInfo? = null, - @ProtoNumber(7) @JvmField val msgTravelInfo: TravelInfo? = null + @ProtoNumber(7) @JvmField val msgTravelInfo: TravelInfo? = null, ) : ProtoBuf @Serializable @@ -224,12 +224,12 @@ internal class AppointDefine : ProtoBuf { @ProtoNumber(11) @JvmField val commentRetAll: Int = 0, @ProtoNumber(12) @JvmField val hotFlag: Int = 0, @ProtoNumber(13) @JvmField val svrReserved: Long = 0L, - @ProtoNumber(14) @JvmField val msgHotEntry: HotEntry? = null + @ProtoNumber(14) @JvmField val msgHotEntry: HotEntry? = null, ) : ProtoBuf @Serializable internal class HotTopicList( - @ProtoNumber(1) @JvmField val topicList: List = emptyList() + @ProtoNumber(1) @JvmField val topicList: List = emptyList(), ) : ProtoBuf @Serializable @@ -247,7 +247,7 @@ internal class AppointDefine : ProtoBuf { @ProtoNumber(22) @JvmField val msgLocale: LocaleInfo? = null, @ProtoNumber(23) @JvmField val feedsIndex: Int = 0, @ProtoNumber(24) @JvmField val msgAd: ADFeed? = null, - @ProtoNumber(25) @JvmField val privateData: ByteArray = EMPTY_BYTE_ARRAY + @ProtoNumber(25) @JvmField val privateData: ByteArray = EMPTY_BYTE_ARRAY, ) : ProtoBuf @Serializable @@ -257,13 +257,13 @@ internal class AppointDefine : ProtoBuf { @ProtoNumber(3) @JvmField val vehicle: Int = 0, @ProtoNumber(4) @JvmField val partnerCount: Int = 0, @ProtoNumber(5) @JvmField val placePicUrl: String = "", - @ProtoNumber(6) @JvmField val placeUrl: String = "" + @ProtoNumber(6) @JvmField val placeUrl: String = "", ) : ProtoBuf @Serializable internal class RecentFreshFeed( @ProtoNumber(1) @JvmField val freshFeedInfo: List = emptyList(), - @ProtoNumber(2) @JvmField val uid: Long = 0L + @ProtoNumber(2) @JvmField val uid: Long = 0L, ) : ProtoBuf @Serializable @@ -271,12 +271,12 @@ internal class AppointDefine : ProtoBuf { @ProtoNumber(1) @JvmField val int32Lat: Int = 900000000, @ProtoNumber(2) @JvmField val int32Lon: Int = 900000000, @ProtoNumber(3) @JvmField val int32Alt: Int = -10000000, - @ProtoNumber(4) @JvmField val int32Type: Int = 0 + @ProtoNumber(4) @JvmField val int32Type: Int = 0, ) : ProtoBuf @Serializable internal class AppointID( - @ProtoNumber(1) @JvmField val requestId: String = "" + @ProtoNumber(1) @JvmField val requestId: String = "", ) : ProtoBuf @Serializable @@ -288,14 +288,14 @@ internal class AppointDefine : ProtoBuf { @ProtoNumber(5) @JvmField val region: String = "", @ProtoNumber(6) @JvmField val poi: String = "", @ProtoNumber(7) @JvmField val msgGps: GPS? = null, - @ProtoNumber(8) @JvmField val address: String = "" + @ProtoNumber(8) @JvmField val address: String = "", ) : ProtoBuf @Serializable internal class LBSInfo( @ProtoNumber(1) @JvmField val msgGps: GPS? = null, @ProtoNumber(2) @JvmField val msgWifis: List = emptyList(), - @ProtoNumber(3) @JvmField val msgCells: List = emptyList() + @ProtoNumber(3) @JvmField val msgCells: List = emptyList(), ) : ProtoBuf @Serializable @@ -307,7 +307,7 @@ internal class AppointDefine : ProtoBuf { @ProtoNumber(5) @JvmField val msgFeedInfo: FeedInfo? = null, @ProtoNumber(6) @JvmField val eventTips: String = "", @ProtoNumber(7) @JvmField val msgComment: FeedComment? = null, - @ProtoNumber(8) @JvmField val cancelEventId: Long = 0L + @ProtoNumber(8) @JvmField val cancelEventId: Long = 0L, ) : ProtoBuf @Serializable @@ -315,7 +315,7 @@ internal class AppointDefine : ProtoBuf { @ProtoNumber(1) @JvmField val strList: List = emptyList(), @ProtoNumber(2) @JvmField val pose: Int = 0, @ProtoNumber(3) @JvmField val cookie: ByteArray = EMPTY_BYTE_ARRAY, - @ProtoNumber(4) @JvmField val uint64Topics: List = emptyList() + @ProtoNumber(4) @JvmField val uint64Topics: List = emptyList(), ) : ProtoBuf @Serializable @@ -337,7 +337,7 @@ internal class AppointDefine : ProtoBuf { @ProtoNumber(15) @JvmField val pushedUsrCount: Int = 0, @ProtoNumber(16) @JvmField val timerangeLeft: Int = 0, @ProtoNumber(17) @JvmField val timerangeRight: Int = 0, - @ProtoNumber(18) @JvmField val area: String = "" + @ProtoNumber(18) @JvmField val area: String = "", ) : ProtoBuf @Serializable @@ -345,14 +345,14 @@ internal class AppointDefine : ProtoBuf { @ProtoNumber(1) @JvmField val eventtype: Int = 0, @ProtoNumber(2) @JvmField val msgRankevent: RankEvent? = null, @ProtoNumber(3) @JvmField val eventUin: Long = 0L, - @ProtoNumber(4) @JvmField val eventTinyid: Long = 0L + @ProtoNumber(4) @JvmField val eventTinyid: Long = 0L, ) : ProtoBuf @Serializable internal class Feed( @ProtoNumber(1) @JvmField val msgUserInfo: PublisherInfo? = null, @ProtoNumber(2) @JvmField val msgFeedInfo: FeedInfo? = null, - @ProtoNumber(3) @JvmField val ownerFlag: Int = 0 + @ProtoNumber(3) @JvmField val ownerFlag: Int = 0, ) : ProtoBuf @Serializable @@ -367,7 +367,7 @@ internal class AppointDefine : ProtoBuf { @ProtoNumber(9) @JvmField val createUin: Long = 0L, @ProtoNumber(10) @JvmField val createTime: Int = 0, @ProtoNumber(11) @JvmField val organizerInfo: OrganizerInfo = OrganizerInfo(), - @ProtoNumber(12) @JvmField val flag: Long? = null + @ProtoNumber(12) @JvmField val flag: Long? = null, ) : ProtoBuf @Serializable @@ -375,7 +375,7 @@ internal class AppointDefine : ProtoBuf { @ProtoNumber(1) @JvmField val openFlag: Int = 0, @ProtoNumber(2) @JvmField val restTime: Int = 0, @ProtoNumber(3) @JvmField val foreword: String = "", - @ProtoNumber(4) @JvmField val backgroundSrc: String = "" + @ProtoNumber(4) @JvmField val backgroundSrc: String = "", ) : ProtoBuf @Serializable @@ -383,24 +383,24 @@ internal class AppointDefine : ProtoBuf { @ProtoNumber(1) @JvmField val msgUserInfo: PublisherInfo? = null, @ProtoNumber(2) @JvmField val msgFeedInfo: FeedInfo? = null, @ProtoNumber(3) @JvmField val ownerFlag: Int = 0, - @ProtoNumber(4) @JvmField val msgActivityInfo: ActivityInfo? = null + @ProtoNumber(4) @JvmField val msgActivityInfo: ActivityInfo? = null, ) : ProtoBuf @Serializable internal class Elem( @ProtoNumber(1) @JvmField val content: String = "", - @ProtoNumber(2) @JvmField val msgFaceInfo: Face? = null + @ProtoNumber(2) @JvmField val msgFaceInfo: Face? = null, ) : ProtoBuf @Serializable internal class HotFreshFeedList( @ProtoNumber(1) @JvmField val msgFeeds: List = emptyList(), - @ProtoNumber(2) @JvmField val updateTime: Int = 0 + @ProtoNumber(2) @JvmField val updateTime: Int = 0, ) : ProtoBuf @Serializable internal class RptInterestTag( - @ProtoNumber(1) @JvmField val interestTags: List = emptyList() + @ProtoNumber(1) @JvmField val interestTags: List = emptyList(), ) : ProtoBuf @Serializable @@ -410,7 +410,7 @@ internal class AppointDefine : ProtoBuf { @ProtoNumber(3) @JvmField val companyAddr: String = "", @ProtoNumber(4) @JvmField val companyPicUrl: String = "", @ProtoNumber(5) @JvmField val companyUrl: String = "", - @ProtoNumber(6) @JvmField val msgCompanyId: ShopID? = null + @ProtoNumber(6) @JvmField val msgCompanyId: ShopID? = null, ) : ProtoBuf @Serializable @@ -436,7 +436,7 @@ internal class AppointDefine : ProtoBuf { @ProtoNumber(19) @JvmField val strangerDeclare: ByteArray = EMPTY_BYTE_ARRAY, @ProtoNumber(20) @JvmField val friendUin: Long = 0L, @ProtoNumber(21) @JvmField val historyFlag: Int = 0, - @ProtoNumber(22) @JvmField val followflag: Long = 0L + @ProtoNumber(22) @JvmField val followflag: Long = 0L, ) : ProtoBuf @Serializable @@ -444,7 +444,7 @@ internal class AppointDefine : ProtoBuf { @ProtoNumber(1) @JvmField val feedId: String = "", @ProtoNumber(2) @JvmField val praiseCount: Int = 0, @ProtoNumber(3) @JvmField val publishUid: Long = 0L, - @ProtoNumber(4) @JvmField val publishTime: Int = 0 + @ProtoNumber(4) @JvmField val publishTime: Int = 0, ) : ProtoBuf @Serializable @@ -452,7 +452,7 @@ internal class AppointDefine : ProtoBuf { @ProtoNumber(1) @JvmField val uin: Long = 0L, @ProtoNumber(2) @JvmField val time: Int = 0, @ProtoNumber(3) @JvmField val feedId: String = "", - @ProtoNumber(4) @JvmField val feedType: Long = 0L + @ProtoNumber(4) @JvmField val feedType: Long = 0L, ) : ProtoBuf @Serializable @@ -461,12 +461,12 @@ internal class AppointDefine : ProtoBuf { @ProtoNumber(2) @JvmField val lableMsgPre: ByteArray = EMPTY_BYTE_ARRAY, @ProtoNumber(3) @JvmField val lableMsgLast: ByteArray = EMPTY_BYTE_ARRAY, @ProtoNumber(4) @JvmField val interstName: List = emptyList(), - @ProtoNumber(5) @JvmField val interstType: List = emptyList() + @ProtoNumber(5) @JvmField val interstType: List = emptyList(), ) : ProtoBuf @Serializable internal class Face( - @ProtoNumber(1) @JvmField val index: Int = 0 + @ProtoNumber(1) @JvmField val index: Int = 0, ) : ProtoBuf @Serializable @@ -485,7 +485,7 @@ internal class AppointDefine : ProtoBuf { @ProtoNumber(12) @JvmField val godflag: Int = 0, @ProtoNumber(13) @JvmField val charm: Int = 0, @ProtoNumber(14) @JvmField val charmLevel: Int = 0, - @ProtoNumber(15) @JvmField val uin: Long = 0L + @ProtoNumber(15) @JvmField val uin: Long = 0L, ) : ProtoBuf @Serializable @@ -498,7 +498,7 @@ internal class AppointDefine : ProtoBuf { @ProtoNumber(6) @JvmField val historyTimes: Long = 0L, @ProtoNumber(7) @JvmField val bgUrl: String = "", @ProtoNumber(8) @JvmField val url: String = "", - @ProtoNumber(9) @JvmField val extraInfo: String = "" + @ProtoNumber(9) @JvmField val extraInfo: String = "", ) : ProtoBuf @Serializable @@ -511,7 +511,7 @@ internal class AppointDefine : ProtoBuf { @ProtoNumber(6) @JvmField val attendIdx: Int = 0, @ProtoNumber(7) @JvmField val eventTips: String = "", @ProtoNumber(8) @JvmField val msgComment: DateComment? = null, - @ProtoNumber(9) @JvmField val cancelEventId: Long = 0L + @ProtoNumber(9) @JvmField val cancelEventId: Long = 0L, ) : ProtoBuf @Serializable @@ -528,7 +528,7 @@ internal class AppointDefine : ProtoBuf { @ProtoNumber(10) @JvmField val commentWording: String = "", @ProtoNumber(11) @JvmField val commentNum: Int = 0, @ProtoNumber(12) @JvmField val attendStatus: Int = 0, - @ProtoNumber(13) @JvmField val msgAppointmentEx: AppointInfoEx? = null + @ProtoNumber(13) @JvmField val msgAppointmentEx: AppointInfoEx? = null, ) : ProtoBuf @Serializable @@ -537,12 +537,12 @@ internal class AppointDefine : ProtoBuf { @ProtoNumber(2) @JvmField val nickname: ByteArray = EMPTY_BYTE_ARRAY, @ProtoNumber(3) @JvmField val age: Int = 0, @ProtoNumber(4) @JvmField val gender: Int = 0, - @ProtoNumber(5) @JvmField val avatar: ByteArray = EMPTY_BYTE_ARRAY + @ProtoNumber(5) @JvmField val avatar: ByteArray = EMPTY_BYTE_ARRAY, ) : ProtoBuf @Serializable internal class ReplyInfo( @ProtoNumber(1) @JvmField val commentId: String = "", - @ProtoNumber(2) @JvmField val msgStrangerInfo: StrangerInfo? = null + @ProtoNumber(2) @JvmField val msgStrangerInfo: StrangerInfo? = null, ) : ProtoBuf } \ No newline at end of file diff --git a/mirai-core/src/commonMain/kotlin/network/protocol/data/proto/FrdSysMsg.kt b/mirai-core/src/commonMain/kotlin/network/protocol/data/proto/FrdSysMsg.kt index 3360fba38..1fff7b7a5 100644 --- a/mirai-core/src/commonMain/kotlin/network/protocol/data/proto/FrdSysMsg.kt +++ b/mirai-core/src/commonMain/kotlin/network/protocol/data/proto/FrdSysMsg.kt @@ -19,14 +19,14 @@ internal class FrdSysMsg { @Serializable internal class AddFrdSNInfo( @JvmField @ProtoNumber(1) val notSeeDynamic: Int = 0, - @JvmField @ProtoNumber(2) val setSn: Int = 0 + @JvmField @ProtoNumber(2) val setSn: Int = 0, ) : ProtoBuf @Serializable internal class AddFriendVerifyInfo( @JvmField @ProtoNumber(1) val type: Int = 0, @JvmField @ProtoNumber(2) val url: String = "", - @JvmField @ProtoNumber(3) val verifyInfo: String = "" + @JvmField @ProtoNumber(3) val verifyInfo: String = "", ) : ProtoBuf @Serializable @@ -35,14 +35,14 @@ internal class FrdSysMsg { @JvmField @ProtoNumber(2) val format: Int = 0, @JvmField @ProtoNumber(3) val entityCategory: String = "", @JvmField @ProtoNumber(4) val entityName: String = "", - @JvmField @ProtoNumber(5) val entityUrl: String = "" + @JvmField @ProtoNumber(5) val entityUrl: String = "", ) : ProtoBuf @Serializable internal class DiscussInfo( @JvmField @ProtoNumber(1) val discussUin: Long = 0L, @JvmField @ProtoNumber(2) val discussName: String = "", - @JvmField @ProtoNumber(3) val discussNick: String = "" + @JvmField @ProtoNumber(3) val discussNick: String = "", ) : ProtoBuf @Serializable @@ -50,17 +50,17 @@ internal class FrdSysMsg { @JvmField @ProtoNumber(1) val eimFuin: Long = 0L, @JvmField @ProtoNumber(2) val eimId: String = "", @JvmField @ProtoNumber(3) val eimTelno: String = "", - @JvmField @ProtoNumber(4) val groupId: Long = 0L + @JvmField @ProtoNumber(4) val groupId: Long = 0L, ) : ProtoBuf @Serializable internal class FriendHelloInfo( - @JvmField @ProtoNumber(1) val sourceName: String = "" + @JvmField @ProtoNumber(1) val sourceName: String = "", ) : ProtoBuf @Serializable internal class FriendMiscInfo( - @JvmField @ProtoNumber(1) val fromuinNick: String = "" + @JvmField @ProtoNumber(1) val fromuinNick: String = "", ) : ProtoBuf @Serializable @@ -68,43 +68,43 @@ internal class FrdSysMsg { @JvmField @ProtoNumber(11) val msgGroupExt: GroupInfoExt? = null, @JvmField @ProtoNumber(12) val msgIntiteInfo: InviteInfo? = null, @JvmField @ProtoNumber(13) val msgSchoolInfo: SchoolInfo? = null, - @JvmField @ProtoNumber(100) val doubtFlag: Int = 0 + @JvmField @ProtoNumber(100) val doubtFlag: Int = 0, ) : ProtoBuf @Serializable internal class GroupInfo( @JvmField @ProtoNumber(1) val groupUin: Long = 0L, @JvmField @ProtoNumber(2) val groupName: String = "", - @JvmField @ProtoNumber(3) val groupNick: String = "" + @JvmField @ProtoNumber(3) val groupNick: String = "", ) : ProtoBuf @Serializable internal class GroupInfoExt( @JvmField @ProtoNumber(1) val notifyType: Int = 0, @JvmField @ProtoNumber(2) val groupCode: Long = 0L, - @JvmField @ProtoNumber(3) val fromGroupadmlist: Int = 0 + @JvmField @ProtoNumber(3) val fromGroupadmlist: Int = 0, ) : ProtoBuf @Serializable internal class InviteInfo( - @JvmField @ProtoNumber(1) val recommendUin: Long = 0L + @JvmField @ProtoNumber(1) val recommendUin: Long = 0L, ) : ProtoBuf @Serializable internal class MsgEncodeFlag( - @JvmField @ProtoNumber(1) val isUtf8: Int = 0 + @JvmField @ProtoNumber(1) val isUtf8: Int = 0, ) : ProtoBuf @Serializable internal class SchoolInfo( @JvmField @ProtoNumber(1) val schoolId: String = "", - @JvmField @ProtoNumber(2) val schoolName: String = "" + @JvmField @ProtoNumber(2) val schoolName: String = "", ) : ProtoBuf @Serializable internal class TongXunLuNickInfo( @JvmField @ProtoNumber(1) val fromuin: Long = 0L, @JvmField @ProtoNumber(2) val touin: Long = 0L, - @JvmField @ProtoNumber(3) val tongxunluNickname: String = "" + @JvmField @ProtoNumber(3) val tongxunluNickname: String = "", ) : ProtoBuf } \ No newline at end of file diff --git a/mirai-core/src/commonMain/kotlin/network/protocol/data/proto/Group.kt b/mirai-core/src/commonMain/kotlin/network/protocol/data/proto/Group.kt index 9eb0c9fab..5e427c536 100644 --- a/mirai-core/src/commonMain/kotlin/network/protocol/data/proto/Group.kt +++ b/mirai-core/src/commonMain/kotlin/network/protocol/data/proto/Group.kt @@ -23,32 +23,32 @@ internal class GroupLabel : ProtoBuf { @ProtoNumber(3) @JvmField val textColor: Color? = null, @ProtoNumber(4) @JvmField val edgingColor: Color? = null, @ProtoNumber(5) @JvmField val labelAttr: Int = 0, - @ProtoNumber(6) @JvmField val labelType: Int = 0 + @ProtoNumber(6) @JvmField val labelType: Int = 0, ) : ProtoBuf @Serializable internal class RspBody( @ProtoNumber(1) @JvmField val error: ByteArray = EMPTY_BYTE_ARRAY, - @ProtoNumber(2) @JvmField val groupInfo: List = emptyList() + @ProtoNumber(2) @JvmField val groupInfo: List = emptyList(), ) : ProtoBuf @Serializable internal class SourceId( - @ProtoNumber(1) @JvmField val sourceId: Int = 0 + @ProtoNumber(1) @JvmField val sourceId: Int = 0, ) : ProtoBuf @Serializable internal class GroupInfo( @ProtoNumber(1) @JvmField val int32Result: Int = 0, @ProtoNumber(2) @JvmField val groupCode: Long = 0L, - @ProtoNumber(3) @JvmField val groupLabel: List