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

[#ICC-101] Return message read status, if applicable #211

Merged
merged 25 commits into from
Jun 30, 2022

Conversation

gquadrati
Copy link
Contributor

@gquadrati gquadrati commented Jun 22, 2022

List of Changes

  • Updated fn-commons, ts-commons and fixed errors in 1887cf3
  • added semver library for version comparison
  • added IUserPreferencesChecker, an interface to check service's read authorization over a user
  • added two IUserPreferencesChecker implementations: in case user's app version does or does not handle read authorization
  • added UserPreferenceCheckerFactory for returning the right implementation

Motivation and Context

return message read status to service, if user didn't explicitly disabled this feature.
In case user was not able to explicitly disable it (version < the one that introduced that feature), it will be disabled by default

How Has This Been Tested?

  • Unit tests
  • Integration tests

Screenshots (if appropriate):

Types of changes

  • Chore (nothing changes by a user perspective)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@pagopa-github-bot
Copy link
Contributor

pagopa-github-bot commented Jun 22, 2022

Warnings
⚠️ This PR changes a total of 1714 LOCs, that is more than a reasonable size of 250. Consider splitting the pull request into smaller ones.
⚠️ Please include a Pivotal story at the beginning of the PR title (see below).

@types/semver

Author: Unknown

Description: TypeScript definitions for semver

Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/semver

Createdabout 6 years ago
Last Updated15 days ago
LicenseMIT
Maintainers1
Releases40
Direct Dependencies
README

[object Object]

semver

Author: GitHub Inc.

Description: The semantic version parser used by npm.

Homepage: https://github.com/npm/node-semver#readme

Createdover 11 years ago
Last Updated4 days ago
LicenseISC
Maintainers5
Releases95
Direct Dependencieslru-cache
This README is too long to show.

New dependencies added: semver and @types/semver.

Example of PR titles that include pivotal stories:

  • single story: [#123456] my PR title
  • multiple stories: [#123456,#123457,#123458] my PR title

Generated by 🚫 dangerJS against 74b17c8

Copy link
Contributor

@michaeldisaro michaeldisaro left a comment

Choose a reason for hiding this comment

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

Code is good, but I found some little points that I'd like to understand better.

GetMessage/userPreferenceChecker/messageReadStatusAuth.ts Outdated Show resolved Hide resolved
GetMessage/handler.ts Outdated Show resolved Hide resolved
GetMessage/__tests__/handler.test.ts Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
@gquadrati gquadrati requested a review from michaeldisaro June 24, 2022 09:50
@gquadrati gquadrati marked this pull request as ready for review June 24, 2022 09:50
@gquadrati gquadrati requested a review from a team as a code owner June 24, 2022 09:50
@gquadrati gquadrati requested a review from Garma00 June 24, 2022 09:50
GetMessage/handler.ts Outdated Show resolved Hide resolved
GetMessage/handler.ts Outdated Show resolved Hide resolved
@gquadrati gquadrati requested a review from BurnedMarshal June 24, 2022 14:41
@gquadrati gquadrati requested a review from michaeldisaro June 24, 2022 14:41
Copy link
Contributor

@AleDore AleDore left a comment

Choose a reason for hiding this comment

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

@gquadrati gquadrati requested a review from AleDore June 27, 2022 18:28
Copy link
Contributor

@AleDore AleDore left a comment

Choose a reason for hiding this comment

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

LGTM @BurnedMarshal @michaeldisaro Can we merge?

Copy link
Contributor

@BurnedMarshal BurnedMarshal left a comment

Choose a reason for hiding this comment

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

Verify this tests titles.

Copy link
Contributor

@BurnedMarshal BurnedMarshal left a comment

Choose a reason for hiding this comment

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

LGTM, only 2 nitpicking comments.

GetMessage/__tests__/handler.test.ts Outdated Show resolved Hide resolved
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@gquadrati gquadrati merged commit 96012f2 into master Jun 30, 2022
@gquadrati gquadrati deleted the ICC-101--return-read-status-in-getMessage branch June 30, 2022 09:07
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.

5 participants