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

Feature Send notifications when a question is resolved #8 #16

Merged
merged 9 commits into from
Feb 27, 2025

Conversation

Ginka3
Copy link
Contributor

@Ginka3 Ginka3 commented Feb 22, 2025

📝 Context
Currently working branch which allows a user to 'tag' a topic as resolved by using the existing functionality. Marker appears in the main menu screen and is able to be searched. Accomplished by adding to the topic title "resolved" in public/src/client/topic.js and updates the topic backend existing resolved status to true/false accordingly.
Uses NodeBB's built-in notification system to notify watchers and the original poster (OP) when a topic's resolved status changes.
Helps users stay updated when a topic they are following gets answered or reopened.

✅ Changes in the Codebase
Added API to set resolved status and trigger notifications
Modified: src/controllers/topics.js
Added: setResolved() function to update the topic status and notify watchers
Sends a notification when a topic is marked resolved or unresolved

Updated UI to visually indicate resolved topics
Modified: public/src/client/topic.js
Appends a "Resolved" badge to topic titles when marked resolved

Integrated notifications for topic watchers
Modified: src/topics/tags.js
When a topic tag changes to "resolved", watchers are notified

WebSocket Integration
Modified: src/controllers/topics.js
Emits event:topicResolvedUpdated to notify the frontend when a topic’s status changes

…ping it in. this will mark the topic as resolved, and will unmark it as resolved if the tag is removed
…/tags.js. additionally added functionality for sending out notifications for all people watching a topic when it becomes marked as resolved or unmarked as resolved
@Ginka3 Ginka3 changed the title Feature Send notifications when a question is resolved #8 [WIP] Feature Send notifications when a question is resolved #8 Feb 22, 2025
@coveralls
Copy link

Pull Request Test Coverage Report for Build 13560569247

Details

  • 19 of 19 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.02%) to 82.689%

Totals Coverage Status
Change from base Build 13335135097: 0.02%
Covered Lines: 22357
Relevant Lines: 25617

💛 - Coveralls

@Misterurias
Copy link
Contributor

Great job, Jason! Looked over the testing for unit tests and integration tests and they look good. Nice job keeping your PR organized and clear to understand. Great addition to the Question resolved feature!

@SubtoFelix
Copy link
Contributor

Awesome job! The API and notifications code all look fine. The unit and integration tests are very comprehensive. Overall, very clear and organized. The PR is also clean and easy to understand!

@sophiazhuu
Copy link

Great work – full test coverage of new features, lint/test running smoothly, organized descriptions of code structure and functionality. LGTM!

@Ginka3 Ginka3 merged commit dea0265 into main Feb 27, 2025
1 of 2 checks passed
@Ginka3 Ginka3 changed the title [WIP] Feature Send notifications when a question is resolved #8 Feature Send notifications when a question is resolved #8 Feb 27, 2025
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.

6 participants