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 the broken DM notification #2389

Merged
merged 2 commits into from
Oct 22, 2024

Conversation

SebinSong
Copy link
Collaborator

@SebinSong SebinSong commented Oct 22, 2024

resolve solution 1. of #2386

I can see the notification works properly now.

notification works

@SebinSong SebinSong self-assigned this Oct 22, 2024
Comment on lines 45 to 47
isDMOrMention: isMentionedMe || getters.chatRoomAttributes.type === CHATROOM_TYPES.DIRECT_MESSAGE,
isDMOrMention: isMentionedMe || targetChatroomState.attributes.type === CHATROOM_TYPES.DIRECT_MESSAGE,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This was the cause of the issue.
getters.chatRoomAttributes getter here is for a currently active chatroom which means the DM notification only works when the receivers of the DM have the chatroom open in their browsers and this is what I observed too.

Made a fix here where it checks if the target chatroom is DM or not, regardless of whether the chatroom is active or not.

@SebinSong SebinSong changed the title Fix the broken DM notification [WIP] Fix the broken DM notification Oct 22, 2024
@SebinSong SebinSong changed the title [WIP] Fix the broken DM notification Fix the broken DM notification Oct 22, 2024
Copy link

cypress bot commented Oct 22, 2024

group-income    Run #3329

Run Properties:  status check passed Passed #3329  •  git commit 7209a1178a ℹ️: Merge 4209910e57f218eee3b85b2042bcf7a54e70b2db into cd4e463201e39c77101340b487a8...
Project group-income
Branch Review sebin/task/#2386-direct-message-notification-broken
Run status status check passed Passed #3329
Run duration 09m 09s
Commit git commit 7209a1178a ℹ️: Merge 4209910e57f218eee3b85b2042bcf7a54e70b2db into cd4e463201e39c77101340b487a8...
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 ↗︎

@SebinSong
Copy link
Collaborator Author

@taoeffect The PR is ready for review.

I can work on updating(or creating) a test item to check for this bug separately from this PR later.

Copy link
Member

@taoeffect taoeffect left a comment

Choose a reason for hiding this comment

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

Seems to have done it!

@taoeffect taoeffect merged commit 915913c into master Oct 22, 2024
4 checks passed
@taoeffect taoeffect deleted the sebin/task/#2386-direct-message-notification-broken branch October 22, 2024 21:01
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.

2 participants