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

[BUG] webhook "Callback before message sending" cannot prevent message sending when the business fails #3049

Open
xuleicz2023 opened this issue Jan 9, 2025 · 1 comment
Labels
bug Categorizes issue or PR as related to a bug.

Comments

@xuleicz2023
Copy link

xuleicz2023 commented Jan 9, 2025

OpenIM Server Version

3.8.1

Operating System and CPU Architecture

Linux (AMD)

Deployment Method

Docker Deployment

Bug Description and Steps to Reproduce

希望:“发送单聊消息前的回调”失败后,消息也发送失败。
步骤:

  1. 对于“发送单聊消息前的回调”,业务系统返回:http状态码200,内容 {"actionCode":1,"errCode":5001,"errMsg":"消息发送失败,请联系管理员!","errDlt":"","nextCode":1}
  2. 且 webhooks.xml中配置的是:
    beforeSendSingleMsg:
    enable: true
    timeout: 5
    failedContinue: false

结果:Web端 IMSDK.sendMessage()调用后的响应中的data.status却是2,表示消息发送成功,查看会话历史,确实也记录到了这条消息。

Screenshots Link

No response

@xuleicz2023 xuleicz2023 added the bug Categorizes issue or PR as related to a bug. label Jan 9, 2025
@OpenIM-Robot OpenIM-Robot changed the title [BUG] webhook“消息发送前的回调”在业务失败时无法阻止消息发送 [BUG] webhook "Callback before message sending" cannot prevent message sending when the business fails Jan 9, 2025
@OpenIM-Robot
Copy link

Hello! Thank you for filing an issue.

If this is a bug report, please include relevant logs to help us debug the problem.

Join slack 🤖 to connect and communicate with our developers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

2 participants