From 36a09ca088032a24c2fe1ec7a03cc2308ef30919 Mon Sep 17 00:00:00 2001
From: Simplxs <simplxsa@gmail.com>
Date: Mon, 8 Apr 2024 20:00:44 +0800
Subject: [PATCH] update kritor

---
 kritor/kritor                                  |  2 +-
 .../internals/GlobalEventTransmitter.kt        | 18 +++++++++---------
 .../main/java/qq/service/msg/NtMsgConvertor.kt |  4 ++--
 3 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/kritor/kritor b/kritor/kritor
index d94600bc..a7dfcf9a 160000
--- a/kritor/kritor
+++ b/kritor/kritor
@@ -1 +1 @@
-Subproject commit d94600bc7adef49c6dcd5a1973578d4a101c9b38
+Subproject commit a7dfcf9aa9692f78f387919034f76e0130f6c12e
diff --git a/xposed/src/main/java/moe/fuqiuluo/shamrock/internals/GlobalEventTransmitter.kt b/xposed/src/main/java/moe/fuqiuluo/shamrock/internals/GlobalEventTransmitter.kt
index 0c6e8414..5a9cbfbf 100644
--- a/xposed/src/main/java/moe/fuqiuluo/shamrock/internals/GlobalEventTransmitter.kt
+++ b/xposed/src/main/java/moe/fuqiuluo/shamrock/internals/GlobalEventTransmitter.kt
@@ -24,12 +24,12 @@ internal object GlobalEventTransmitter : QQInterfaces() {
         MutableSharedFlow<NoticeEvent>()
     }
     private val requestEventFlow by lazy {
-        MutableSharedFlow<RequestsEvent>()
+        MutableSharedFlow<RequestEvent>()
     }
 
     private suspend fun pushNotice(noticeEvent: NoticeEvent) = noticeEventFlow.emit(noticeEvent)
 
-    private suspend fun pushRequest(requestEvent: RequestsEvent) = requestEventFlow.emit(requestEvent)
+    private suspend fun pushRequest(requestEvent: RequestEvent) = requestEventFlow.emit(requestEvent)
 
     private suspend fun transMessageEvent(record: MsgRecord, message: PushMessageBody) =
         MessageEventFlow.emit(record to message)
@@ -484,13 +484,13 @@ internal object GlobalEventTransmitter : QQInterfaces() {
      */
     object RequestTransmitter {
         suspend fun transFriendApp(time: Long, operator: Long, tipText: String, flag: String): Boolean {
-            pushRequest(RequestsEvent.newBuilder().apply {
-                this.type = RequestsEvent.RequestType.FRIEND_APPLY
+            pushRequest(RequestEvent.newBuilder().apply {
+                this.type = RequestEvent.RequestType.FRIEND_APPLY
                 this.time = time.toInt()
+                this.requestId = flag
                 this.friendApply = FriendApplyRequest.newBuilder().apply {
                     this.applierUin = operator
                     this.message = tipText
-                    this.flag = flag
                 }.build()
             }.build())
             return true
@@ -504,15 +504,15 @@ internal object GlobalEventTransmitter : QQInterfaces() {
             groupCode: Long,
             flag: String
         ): Boolean {
-            pushRequest(RequestsEvent.newBuilder().apply {
-                this.type = RequestsEvent.RequestType.GROUP_APPLY
+            pushRequest(RequestEvent.newBuilder().apply {
+                this.type = RequestEvent.RequestType.GROUP_APPLY
                 this.time = time.toInt()
+                this.requestId = flag
                 this.groupApply = GroupApplyRequest.newBuilder().apply {
                     this.applierUid = applierUid
                     this.applierUin = applierUin
                     this.groupId = groupCode
                     this.reason = reason
-                    this.flag = flag
                 }.build()
             }.build())
             return true
@@ -535,7 +535,7 @@ internal object GlobalEventTransmitter : QQInterfaces() {
         }
     }
 
-    suspend inline fun onRequestEvent(collector: FlowCollector<RequestsEvent>) {
+    suspend inline fun onRequestEvent(collector: FlowCollector<RequestEvent>) {
         requestEventFlow.collect {
             GlobalScope.launch {
                 collector.emit(it)
diff --git a/xposed/src/main/java/qq/service/msg/NtMsgConvertor.kt b/xposed/src/main/java/qq/service/msg/NtMsgConvertor.kt
index ed96317e..3422a878 100644
--- a/xposed/src/main/java/qq/service/msg/NtMsgConvertor.kt
+++ b/xposed/src/main/java/qq/service/msg/NtMsgConvertor.kt
@@ -663,14 +663,14 @@ object NtMsgConvertor {
                 }
             }
 
-            MusicPlatform.NetEase -> {
+            MusicPlatform.NETEASE -> {
                 val id = sourceMusic.music.id
                 if (!MusicHelper.tryShare163MusicById(contact, msgId, id)) {
                     LogCenter.log("无法发送网易云音乐分享", Level.ERROR)
                 }
             }
 
-            MusicPlatform.Custom -> {
+            MusicPlatform.CUSTOM -> {
                 val data = sourceMusic.music.custom
                 ArkMsgHelper.tryShareMusic(
                     contact,