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

#2441 - proposal notifications should have 'you' when I am the creator #2444

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

SebinSong
Copy link
Collaborator

@SebinSong SebinSong commented Dec 6, 2024

closes #2441

Made fixes for NEW_PROPOSAL and PROPOSAL_CLOSED notifications.
PROPOSAL_EXPIRING does not need this fix because it is emitted only to those who have not voted yet. (Creator always votes for 'yes') But please let me know if I have missed anything here.

@SebinSong SebinSong self-assigned this Dec 6, 2024
Copy link

cypress bot commented Dec 6, 2024

group-income    Run #3545

Run Properties:  status check passed Passed #3545  •  git commit c000907529 ℹ️: Merge b532560e7b334c043e28963e56a527cd0fda604f into 7b1c2b3f5018516781f8955dec2b...
Project group-income
Branch Review sebin/task/#2441-notification-should-have-you
Run status status check passed Passed #3545
Run duration 08m 54s
Commit git commit c000907529 ℹ️: Merge b532560e7b334c043e28963e56a527cd0fda604f into 7b1c2b3f5018516781f8955dec2b...
Committer Sebin Song
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 10
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 111
View all changes introduced in this branch ↗︎

@@ -702,6 +702,7 @@ sbp('chelonia/defineContract', {
createdDate: meta.createdDate,
groupID: contractID,
creatorID: innerSigningContractID,
isCreator: innerSigningContractID === loggedIn.identityContractID,
Copy link
Member

Choose a reason for hiding this comment

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

Instead of isCreator, I think it'd be better to leave this as is, and add the creatorID to the PROPOSAL_CLOSED notification. Then, we can check for creator when the notification text is created. (The reason for doing it this way is to keep the contract code as less reliant on external state as possible).

sbp('gi.notifications/emit', 'PROPOSAL_CLOSED', {
createdDate: meta.createdDate,
groupID: contractID,
isCreator: loggedIn.identityContractID === proposal.creatorID,
Copy link
Member

Choose a reason for hiding this comment

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

@SebinSong
Copy link
Collaborator Author

@taoeffect Updated the PR for Ricardo's feedbacks.

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.

Notification should say "you" / "your" for user's own proposal
2 participants