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] offlinePush of notification config didn't work #2390

Closed
onenameneo opened this issue Jul 3, 2024 · 6 comments · Fixed by #2422
Closed

[BUG] offlinePush of notification config didn't work #2390

onenameneo opened this issue Jul 3, 2024 · 6 comments · Fixed by #2422
Labels
bug Categorizes issue or PR as related to a bug.

Comments

@onenameneo
Copy link

onenameneo commented Jul 3, 2024

OpenIM Server Version

3.7

Operating System and CPU Architecture

Linux (AMD)

Deployment Method

Docker Deployment

Bug Description and Steps to Reproduce

目前在项目中我们使用FCM的离线推送,当用户离线时,对用户进行的群操作,比如 邀请进群,openIM会推送离线消息,
截屏 2024-07-03 17 33 30
这个 [NEWMSG] 应该时调用firebase推送入参的 title、desc 都未设置
我们尝试修改了notification的配置
举例:

memberInvited:
  isSendMsg: true
  reliabilityLevel: 1
  unreadCount: false
  offlinePush:
    enable: false
    title: "memberInvited title"
    desc: "memberInvited desc"
    ext: "memberInvited ext"

offlinePush中的配置并未生效,enable 无论 true 或者 false 都是都会推送离线消息。
如果修改 isSendMsg 为 false,那么这个memberInvited操作在线消息和离线消息都不会发送。

@onenameneo onenameneo added the bug Categorizes issue or PR as related to a bug. label Jul 3, 2024
@kubbot kubbot changed the title [BUG] [BUG] Jul 3, 2024
@kubbot
Copy link
Contributor

kubbot commented Jul 3, 2024

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.

@onenameneo onenameneo changed the title [BUG] [BUG] offlinePush of notification config didn't work Jul 3, 2024
@printlin
Copy link
Contributor

Hi, I have thoroughly reviewed the memberInvited handling logic regarding notifications. I can confirm that the offlinePush configuration item in the notification configuration file only uses the enable parameter, and this parameter is loaded but not used. I have replicated your issue and have also fixed it locally; this solution is feasible. I believe there is a design conflict in OpenIM, or the functionality is not fully implemented. It appears that the offline push notifications for system notifications have not been implemented. I am attempting to implement this functionality, which involves a significant amount of work and changes to other projects, so it will take some time.

@printlin
Copy link
Contributor

After careful inspection, I found that only minor changes are needed to fix this bug. I have submitted a PR.

@onenameneo
Copy link
Author

@printlin Hello, we have deployed using the latest version of Docker and tested the offline push configurations for 'memberInvited' and 'memberKicked'. The issue has not been resolved; the offlinePush still do not take effect.

case 1

memberInvited:
  isSendMsg: true
  reliabilityLevel: 1
  unreadCount: false
  offlinePush:
    enable: false
    title: "memberInvited title"
    desc: "memberInvited desc"
    ext: "memberInvited ext"

offlinePush.enable = false , still get [NEWMSG] offline message

case 2

memberInvited:
  isSendMsg: true
  reliabilityLevel: 1
  unreadCount: false
  offlinePush:
    enable: true
    title: "Hi.test title"
    desc: "Hi.test desx"
    ext: "test"

still get [NEWMSG] offline message

case 3

memberInvited:
  isSendMsg: false
  reliabilityLevel: 1
  unreadCount: false
  offlinePush:
    enable: true
    title: "Hi.test title"
    desc: "Hi.test desx"
    ext: "test"

change isSendMsg to false, the message will not be pushed, 'isSendMsg' is worked.

@printlin
Copy link
Contributor

printlin commented Aug 6, 2024

Okay, I will follow up

@printlin
Copy link
Contributor

printlin commented Aug 6, 2024

I was unable to reproduce your issue. I deployed using the source code on the release-v3.8 branch, and all configurations match my expectations. To verify, I also printed the title and content at the Push source code, and everything appears normal. Perhaps you could double-check if you are using the latest code.
I have done all the verification methods I can think of and there have been no issues. If you have any questions, tell me

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

Successfully merging a pull request may close this issue.

3 participants