Skip to content

[backend] now also send stream message in digest notifications (#8685) #11004

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

Open
wants to merge 4 commits into
base: release/current
Choose a base branch
from

Conversation

JeremyCloarec
Copy link
Contributor

@JeremyCloarec JeremyCloarec commented May 14, 2025

Proposed changes

  • now also send stream message in digest notifications

Related issues

Checklist

  • I consider the submitted work as finished
  • I tested the code for its functionality
  • I wrote test cases for the relevant uses case (coverage and e2e)
  • I added/update the relevant documentation (either on github or on notion)
  • Where necessary I refactored code to improve the overall quality

Further comments

@github-actions github-actions bot added the filigran team use to identify PR from the Filigran team label May 14, 2025
@JeremyCloarec JeremyCloarec marked this pull request as ready for review May 14, 2025 13:23
Copy link

codecov bot commented May 14, 2025

Codecov Report

Attention: Patch coverage is 4.00000% with 24 lines in your changes missing coverage. Please review.

Project coverage is 65.67%. Comparing base (1fe0353) to head (c9395ce).
Report is 8 commits behind head on release/current.

Files with missing lines Patch % Lines
...rm/opencti-graphql/src/manager/publisherManager.ts 4.34% 22 Missing ⚠️
...opencti-graphql/src/manager/notificationManager.ts 0.00% 2 Missing ⚠️
Additional details and impacted files
@@                 Coverage Diff                 @@
##           release/current   #11004      +/-   ##
===================================================
+ Coverage            65.64%   65.67%   +0.03%     
===================================================
  Files                  680      680              
  Lines                67304    67320      +16     
  Branches              7426     7435       +9     
===================================================
+ Hits                 44182    44213      +31     
+ Misses               23122    23107      -15     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@lndrtrbn lndrtrbn self-requested a review May 15, 2025 07:08
let fullMessage = notificationMessage;
if (origin && streamMessage) {
const { user_id } = origin;
const streamUser = usersMap.get(user_id as string) as AuthUser;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as AuthUser is not needed

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not a fan neither of as string to bypass the fact that TypeScript is telling that user_id can be undefined
it would be better to trust TypeScript and use .get(user_id ?? '') to be sure to pass a string as argument

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll improve it yes you're right, this was copy pasted and refactored from what was done in processLiveNotificationEvent before

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
filigran team use to identify PR from the Filigran team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants