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

[PM-10600] Push notification with full notification center content #5086

Open
wants to merge 1 commit into
base: km/pm-10600
Choose a base branch
from

Conversation

mzieniukbw
Copy link
Contributor

@mzieniukbw mzieniukbw commented Nov 26, 2024

🎟️ Tracking

https://bitwarden.atlassian.net/browse/PM-10600

This is Part 2.
See Part 1: #4923
See Part 3: #5057

📔 Objective

Notification Center push notification now includes all the fields.

The push notification have a limit of 4KB for payload (limitation of Azure Notification Hub, FCM and APNS). For notification center push notification, only Body field needs to have a max length, since other fields have deterministic max length. No other push notifications are affected.
To fix this, a separate PR will follow once the API PR is merged #4852 that will have the max length of 3000 on the Body field in the request and optionally in db column too.

📸 Screenshots

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • ❌ (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

Notification Center push notification now includes all the fields.
@mzieniukbw mzieniukbw requested review from withinfocus and a team November 26, 2024 07:27
@mzieniukbw mzieniukbw marked this pull request as ready for review November 26, 2024 07:27
Copy link

codecov bot commented Nov 26, 2024

Codecov Report

Attention: Patch coverage is 60.00000% with 16 lines in your changes missing coverage. Please review.

Project coverage is 43.31%. Comparing base (d028029) to head (2ba2a56).

Files with missing lines Patch % Lines
...tations/NotificationsApiPushNotificationService.cs 0.00% 7 Missing ⚠️
...es/Implementations/RelayPushNotificationService.cs 0.00% 7 Missing ⚠️
...NoopImplementations/NoopPushNotificationService.cs 0.00% 1 Missing ⚠️
src/Notifications/HubHelpers.cs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@               Coverage Diff               @@
##           km/pm-10600    #5086      +/-   ##
===============================================
+ Coverage        43.30%   43.31%   +0.01%     
===============================================
  Files             1412     1412              
  Lines            64887    64917      +30     
  Branches          5935     5936       +1     
===============================================
+ Hits             28099    28120      +21     
- Misses           35550    35560      +10     
+ Partials          1238     1237       -1     

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

Copy link
Contributor

Logo
Checkmarx One – Scan Summary & Details6872e9e6-e7a1-4bd4-9886-37d86ce720c2

New Issues

Severity Issue Source File / Package Checkmarx Insight
MEDIUM CSRF /src/Api/Controllers/PushController.cs: 38 Attack Vector

@mzieniukbw mzieniukbw changed the title PM-10600: Push notification with full notification center content. [PM-10600] Push notification with full notification center content. Nov 26, 2024
@withinfocus withinfocus changed the title [PM-10600] Push notification with full notification center content. [PM-10600] Push notification with full notification center content Nov 26, 2024
Copy link
Contributor

@withinfocus withinfocus left a comment

Choose a reason for hiding this comment

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

Makes sense to me. KM team for full review.

Copy link
Contributor

@Thomas-Avery Thomas-Avery left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants