-
Notifications
You must be signed in to change notification settings - Fork 2
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 information activity after purge #849
Conversation
…. Therefore the information activity reports must be performed synchronously.
📝 WalkthroughWalkthroughThe changes update the encapsulation of the Changes
Possibly related PRs
Suggested labels
Suggested reviewers
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/Altinn.Correspondence.Application/PurgeCorrespondence/PurgeCorrespondenceHelper.cs
(2 hunks)
🔇 Additional comments (2)
src/Altinn.Correspondence.Application/PurgeCorrespondence/PurgeCorrespondenceHelper.cs (2)
19-19
: Improved field encapsulation.Adding the
private readonly
modifiers to the_dialogportenService
field improves encapsulation and ensures the reference cannot be modified after initialization. This is a good practice that aligns with proper dependency management in C#.
106-106
: Update caller method to handle asynchronous reporting.If you implement the suggested changes to make
ReportActivityToDialogporten
asynchronous, this line will need to be updated to await the result.- ReportActivityToDialogporten(isSender: isSender, correspondence.Id); + await ReportActivityToDialogporten(isSender: isSender, correspondence.Id);Verify the signature of
CreateInformationActivity
in theIDialogportenService
interface to confirm whether it returns a Task that should be awaited.
src/Altinn.Correspondence.Application/PurgeCorrespondence/PurgeCorrespondenceHelper.cs
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good
Description
It is not possible to set status on a dialog after it has been purged. Therefore the information activity reports must be performed synchronously.
This is the cause of our Slack spams.
Related Issue(s)
Verification
Documentation
Summary by CodeRabbit