doclin-dev / doclin

Server and VS Code Extension of Doclin
https://doclin.dev
GNU Affero General Public License v3.0
44 stars 22 forks source link

Add anonymous posting feature to thread notification #140

Closed abhedanil closed 1 month ago

abhedanil commented 1 month ago

Description

This pull request addresses the issue of revealing the thread creator's name in email notifications when the thread is posted anonymously. The following changes were made:

Added an anonymous parameter to the sendMentionEmailNotification function.

Checklist

abhedanil commented 1 month ago

Hi @shawonibnkamal , by following my method we can avoid a db operation right ? In your suggested method we are trying to fetch details without checking the the message is anonymous or not . Correct me if i am wrong .

shawonibnkamal commented 1 month ago

Hi @shawonibnkamal , by following my method we can avoid a db operation right ? In your suggested method we are trying to fetch details without checking the the message is anonymous or not . Correct me if i am wrong .

Good point! Yes, you can do it your way as long as the constant string is defined on top of the file and the formatting issues are fixed.

abhedanil commented 1 month ago

I made All the changes you suggested .

Change Summary

shawonibnkamal commented 1 month ago

Thanks @abhedanil, code tested good! Would you be able to run npm run prettier-fix again? The formatting issue does not seem to be fixed, I wonder if prettier is not working as expected.

Also, can you let me know what trouble you are having with the local setup? Your feedback will help improve the local setup.

abhedanil commented 1 month ago

HI, @shawonibnkamal formatted the code . The local issue i am facing was i couldn't trigger the api edpoint for creating threads.

shawonibnkamal commented 1 month ago

HI, @shawonibnkamal formatted the code . The local issue i am facing was i couldn't trigger the api edpoint for creating threads.

How were you trying to test it? Did you run the extension and server locally?

shawonibnkamal commented 1 month ago

Hi @abhedanil, also noticed your commit isn't connected to your github account. You may want to set it up correctly, if you want all your commits and activity to show up in your github profile.

https://docs.github.com/en/pull-requests/committing-changes-to-your-project/troubleshooting-commits/why-are-my-commits-linked-to-the-wrong-user

abhedanil commented 1 month ago

Its seems my git config changed somehow. Can i add a comment in the code and so it counts on my contribution ?

abhedanil commented 1 month ago

Actually i was not able to test the reply and post thread in local because i was not able to trigger api by curl or postman . If you can guide me through the steps i will be able to take other tasks too.

shawonibnkamal commented 1 month ago

Its seems my git config changed somehow. Can i add a comment in the code and so it counts on my contribution?

For sure! You can refactor or clean up any unclean code. We avoid inline comments unless necessary. I should be able to add some easy tasks by the weekend if you're interested.

Actually i was not able to test the reply and post thread in local because i was not able to trigger api by curl or postman . If you can guide me through the steps i will be able to take other tasks too.

You don't need to use postman. Were you able to run the extension locally? You should be able to test your local server easily using the extension in debugger mode.

abhedanil commented 1 month ago

Sure . Please assign some more task if possible , i can take up that. I will try to run the extension next time . Thanks.