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

fix: always notify if revocation notification record exists #1665

Merged
merged 2 commits into from
Mar 14, 2022

Conversation

TimoGlastra
Copy link
Contributor

Removes the check to notify in the on_revocation_published event handler. This check in the on_revocation_published would only take the global config option into account, meaning it doesn't matter if you provided notify: true in the /revoke endpoint.

ARevNotificationRecord is only created if a notification should be sent (either global agent config, or notify prop in the revoke endpoint). So if a record exists I think we can assume that a notification should be sent as otherwise the record wouldn't exist in the first place. Maybe I'm missing something?

https://github.com/hyperledger/aries-cloudagent-python/blob/681e9aab9a6f6d3e76484d02ccb969d3227bf34f/aries_cloudagent/revocation/manager.py#L116-L126

Signed-off-by: Timo Glastra <timo@animo.id>
@TimoGlastra TimoGlastra requested a review from dbluhm March 13, 2022 19:21
@codecov-commenter
Copy link

codecov-commenter commented Mar 13, 2022

Codecov Report

Merging #1665 (1f8453c) into main (535f14e) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #1665      +/-   ##
==========================================
- Coverage   95.50%   95.50%   -0.01%     
==========================================
  Files         528      528              
  Lines       32738    32736       -2     
==========================================
- Hits        31266    31264       -2     
  Misses       1472     1472              

@TimoGlastra TimoGlastra changed the title fix: always notify if revocation record exists fix: always notify if revocation notification record exists Mar 13, 2022
Copy link
Contributor

@dbluhm dbluhm left a comment

Choose a reason for hiding this comment

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

Away from a computer ATM so not the most thorough of reviews but the changes look good and reasoning seem reasonable :)

@andrewwhitehead andrewwhitehead merged commit e77d087 into main Mar 14, 2022
@andrewwhitehead andrewwhitehead deleted the fix/always-notify-if-notification-record branch March 14, 2022 21:42
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.

4 participants