获取合并转发消息内容报错
guimc233 opened this issue · comments
问题描述
如题
以下网络日志已手动脱敏
复现
发送一条合并转发消息
Overflow 版本
2.16.0-eb376cc-SNAPSHOT
其他组件版本
Lagrange.Core 0.0.1-alpha (commit c94c093)
mirai-core 2.16.0
系统日志
2024-01-27 10:29:26 W/stderr: Exception in thread "DefaultDispatcher-worker-8" java.lang.NullPointerException
2024-01-27 10:29:26 W/stderr: at cn.evole.onebot.sdk.util.json.ForwardMsgAdapter.deserialize(ForwardMsgAdapter.java:17)
2024-01-27 10:29:26 W/stderr: at cn.evole.onebot.sdk.util.json.ForwardMsgAdapter.deserialize(ForwardMsgAdapter.java:11)
2024-01-27 10:29:26 W/stderr: at top.mrxiaom.overflow.internal.deps.gson.internal.bind.TreeTypeAdapter.read(TreeTypeAdapter.java:76)
2024-01-27 10:29:26 W/stderr: at top.mrxiaom.overflow.internal.deps.gson.internal.bind.ReflectiveTypeAdapterFactory$1.readIntoField(ReflectiveTypeAdapterFactory.java:212)
2024-01-27 10:29:26 W/stderr: at top.mrxiaom.overflow.internal.deps.gson.internal.bind.ReflectiveTypeAdapterFactory$FieldReflectionAdapter.readField(ReflectiveTypeAdapterFactory.java:433)
2024-01-27 10:29:26 W/stderr: at top.mrxiaom.overflow.internal.deps.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:393)
2024-01-27 10:29:26 W/stderr: at top.mrxiaom.overflow.internal.deps.gson.Gson.fromJson(Gson.java:1227)
2024-01-27 10:29:26 W/stderr: at top.mrxiaom.overflow.internal.deps.gson.Gson.fromJson(Gson.java:1137)
2024-01-27 10:29:26 W/stderr: at top.mrxiaom.overflow.internal.deps.gson.Gson.fromJson(Gson.java:1047)
2024-01-27 10:29:26 W/stderr: at top.mrxiaom.overflow.internal.deps.gson.Gson.fromJson(Gson.java:1014)
2024-01-27 10:29:26 W/stderr: at cn.evole.onebot.sdk.util.json.GsonUtil.fromJson(GsonUtil.java:83)
2024-01-27 10:29:26 W/stderr: at cn.evolvefield.onebot.client.core.Bot.getForwardMsg(Bot.kt:1122)
2024-01-27 10:29:26 W/stderr: at cn.evolvefield.onebot.client.core.Bot$getForwardMsg$1.invokeSuspend(Bot.kt)
2024-01-27 10:29:26 W/stderr: at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
2024-01-27 10:29:26 W/stderr: at kotlinx.coroutines.internal.ScopeCoroutine.afterResume(Scopes.kt:33)
2024-01-27 10:29:26 W/stderr: at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:102)
2024-01-27 10:29:26 W/stderr: at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
2024-01-27 10:29:26 W/stderr: at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
2024-01-27 10:29:26 W/stderr: at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
2024-01-27 10:29:26 W/stderr: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
2024-01-27 10:29:26 W/stderr: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
2024-01-27 10:29:26 W/stderr: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)
2024-01-27 10:29:26 W/stderr: Suppressed: kotlinx.coroutines.DiagnosticCoroutineContextException: [CoroutineName(overflow), StandaoneCoroutine{Cancelling}@90a7c14, Dispatchers.Default]
网络日志
2024-01-27 10:29:25 D/Onebot: Send to server --> {"action":"get_forward_msg","params":{"id":"JVlHmW********SriI+h"},"echo":8}
2024-01-27 10:29:26 D/Onebot: Client received <-- {"status":"ok","retcode":0,"data":{"message":[{"type":"node","data":{"user_id":132*****44,"nickname":"","content":[{"type":"text","data":{"text":"[GitHub WebHook]\n| New Commit to repo BakaBotTeam/lgz-bot\n| Author: Guimc (xiluo@guimc.ltd)\n| Branch: refs/heads/master\n| ++0 --0 **1\n| Commit Message: support image send for ACGCommand by using OverflowAPI\n| Details: https://github.com/BakaBotTeam/lgz-bot/commit/f01bfc148a19c4c6956c10610499b99fcacfe962"}}]}},{"type":"node","data":{"user_id":132*****44,"nickname":"","content":[{"type":"text","data":{"text":"[GitHub WebHook]\n| New Commit to repo BakaBotTeam/lgz-bot\n| Author: Guimc (xiluo@guimc.ltd)\n| Branch: refs/heads/master\n| ++0 --0 **1\n| Commit Message: add license\n| Details: https://github.com/BakaBotTeam/lgz-bot/commit/22b1412224a6b427442432d4225cada8b2da276a"}}]}}]},"echo":8}
补充信息
No response
在Onebot v11 标准中 给出的返回应该是 message
然而 Overflow 获取的却是 messages
附链接:https://github.com/botuniverse/onebot-11/blob/master/api/public.md#%E5%93%8D%E5%BA%94%E6%95%B0%E6%8D%AE-5
没修好。。我提pr吧
另外 这个JsonsObject类里一堆大便 建议自行检查一下