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

Add backend logic for posting anonymously (User Story 4) #37

Merged
merged 5 commits into from
Sep 26, 2024

Conversation

mohamed-elzeni
Copy link
Member

@mohamed-elzeni mohamed-elzeni commented Sep 26, 2024

This adds the backend logic of posting anonymously.

It is done by capturing the click of the added "Submit Anonymously" button in the submit dropdown menu and adding an attribute that is passed to the post function. The post function then utilizes Topics.post to post as a guest by changing the user ID to 0, making the author of the post completely anonymous.

This has been tested by the linting and testing suite, in addition to testing the interface manually.

The main changes are in the following files:

  • node_modules/nodebb-plugin-composer-default/static/lib/composer.js
  • node_modules/nodebb-plugin-composer-default/static/templates/partials/composer-title-container.tpl
  • src/topics/create.js

This resolves #10 & resolves #11. This also fully completes and resolves #15.

@mohamed-elzeni mohamed-elzeni added enhancement New feature or request backend main code is written in backend labels Sep 26, 2024
@mohamed-elzeni mohamed-elzeni added this to the Sprint 1 milestone Sep 26, 2024
@coveralls
Copy link

coveralls commented Sep 26, 2024

Pull Request Test Coverage Report for Build 11057018853

Details

  • 1 of 2 (50.0%) changed or added relevant lines in 1 file are covered.
  • 3 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.02%) to 82.682%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/topics/create.js 1 2 50.0%
Files with Coverage Reduction New Missed Lines %
src/user/approval.js 3 87.61%
Totals Coverage Status
Change from base Build 11054885215: -0.02%
Covered Lines: 22353
Relevant Lines: 25615

💛 - Coveralls

Copy link

@tatougueye tatougueye left a comment

Choose a reason for hiding this comment

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

This looks good to me. I pulled it and its incorporating well with the changes I made!

@aattiyah aattiyah changed the title Add backend logic for posting anonymously Add backend logic for posting anonymously (User Story 4) Sep 26, 2024
Copy link

@aattiyah aattiyah left a comment

Choose a reason for hiding this comment

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

The code looks good to me!

@mohamed-elzeni mohamed-elzeni self-assigned this Sep 26, 2024
Copy link

@akobaidan akobaidan left a comment

Choose a reason for hiding this comment

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

LGTM

@mohamed-elzeni mohamed-elzeni removed the request for review from lhitmi September 26, 2024 17:08
@mohamed-elzeni mohamed-elzeni merged commit 3ebbe02 into f24 Sep 26, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment