Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

获取合并转发消息内容报错 #15

Closed
guimc233 opened this issue Jan 27, 2024 · 4 comments
Closed

获取合并转发消息内容报错 #15

guimc233 opened this issue Jan 27, 2024 · 4 comments
Labels
question 对错误或其它问题进行提问

Comments

@guimc233
Copy link
Contributor

问题描述

如题
以下网络日志已手动脱敏

复现

发送一条合并转发消息

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 ([email protected])\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 ([email protected])\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

@guimc233 guimc233 added the question 对错误或其它问题进行提问 label Jan 27, 2024
@guimc233
Copy link
Contributor Author

guimc233 commented Jan 27, 2024

在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

@guimc233
Copy link
Contributor Author

pr: #16

@guimc233
Copy link
Contributor Author

没修好。。我提pr吧

@guimc233
Copy link
Contributor Author

另外 这个JsonsObject类里一堆大便 建议自行检查一下

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question 对错误或其它问题进行提问
Projects
None yet
Development

No branches or pull requests

1 participant