larksuite / larksuite/oapi-sdk-java
[bug]关于消息卡片按钮点击事件问题
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 310
- Forks
- 115
- PR merge metrics
- No merged PRs in 30d
Description
使用的java sdk,
我的机器人给我发的消息卡片 包括title,image和一个button,也配置了事件回调地址
事件回调的时候要改变消息卡片的title消息
我在junit写我的发消息方法,和修改刚才发出去的消息卡片是没有问题的,飞书里内容也更改了
但是我在springboot启动后,对之前发的消息卡片消息点了按钮,我的回调地址也收到了回调,也更改了消息卡片的内容,但是飞书里给我的效果就是原来的内容变成修改后的内容,维持了不到一秒,又变回了原来的内容。
我通过在回调里,通过休眠线程回调超时,飞书端也看到了请求失败的提示,然后我休眠结束自动执行后续代码修改消息内容,然后客户端的内容并没有变回原来的内容。
后续我通过在处理事件回调里时新开一个线程来执行修改消息卡片消息,飞书客户端发现也能正常显示,没有变回原来的内容。
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start from the Spring Boot event-callback handler and compare it with the JUnit path that sends and updates the message card. Reproduce the button click and observe the card title after the callback returns, including the delayed and separate-thread cases. Done means the updated title remains visible without relying on a sleeping callback or a newly created thread.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring-boot
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100