[PR #394] [MERGED] feat: add EMAIL_KV_BLACK_LIST #558

Closed
opened 2026-02-26 21:31:47 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/dreamhunter2333/cloudflare_temp_email/pull/394
Author: @dreamhunter2333
Created: 8/11/2024
Status: Merged
Merged: 8/11/2024
Merged by: @dreamhunter2333

Base: mainHead: feature/dev


📝 Commits (1)

  • d67d5db feat: add EMAIL_KV_BLACK_LIST

📊 Changes

8 files changed (+48 additions, -8 deletions)

View changed files

📝 CHANGELOG.md (+1 -0)
📝 frontend/package.json (+1 -1)
📝 frontend/src/api/index.js (+1 -1)
📝 frontend/src/views/admin/AccountSettings.vue (+14 -1)
📝 worker/src/admin_api/index.ts (+10 -2)
📝 worker/src/constants.ts (+2 -1)
worker/src/email/black_list.ts (+16 -0)
📝 worker/src/email/index.ts (+3 -2)

📄 Description

User description

#379


PR Type

Enhancement, Bug fix


Description

  • Added a new field fromBlockList in the admin account settings to block specific email addresses.
  • Updated the admin API to handle the new fromBlockList field in both GET and POST requests.
  • Created a new module to check if an email address is blocked and integrated it into the email handling logic.
  • Fixed a potential error handling issue in the frontend API.
  • Updated the project version to 0.7.1 and documented the changes in the changelog.

Changes walkthrough 📝

Relevant files
Enhancement
AccountSettings.vue
Add email address block list field in admin settings         

frontend/src/views/admin/AccountSettings.vue

  • Added a new field fromBlockList for blocking email addresses.
  • Updated UI to include the new field with translations.
  • Modified data fetching and saving logic to handle the new field.
  • +14/-1   
    index.ts
    Handle fromBlockList in admin API                                               

    worker/src/admin_api/index.ts

  • Added handling for fromBlockList in GET and POST requests.
  • Integrated new constant EMAIL_KV_BLACK_LIST.
  • +10/-2   
    constants.ts
    Define EMAIL_KV_BLACK_LIST constant                                           

    worker/src/constants.ts

  • Added new constant EMAIL_KV_BLACK_LIST.
  • Updated version to v0.7.1.
  • +2/-1     
    black_list.ts
    Implement email address blocking logic                                     

    worker/src/email/black_list.ts

    • Created a new module to check if an email address is blocked.
    +16/-0   
    index.ts
    Integrate email blocking in email handling                             

    worker/src/email/index.ts

  • Integrated isBlocked function to reject emails from blocked addresses.

  • +3/-2     
    Bug fix
    index.js
    Fix potential error handling issue in API                               

    frontend/src/api/index.js

    • Added optional chaining to handle potential undefined message.
    +1/-1     
    Documentation
    CHANGELOG.md
    Update changelog for version 0.7.1                                             

    CHANGELOG.md

  • Updated changelog to include new feature for email block list
    configuration.
  • +1/-0     
    Configuration changes
    package.json
    Bump frontend package version to 0.7.1                                     

    frontend/package.json

    • Updated version to 0.7.1.
    +1/-1     

    💡 PR-Agent usage:
    Comment /help on the PR to get a list of all available PR-Agent tools and their descriptions


    🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

    ## 📋 Pull Request Information **Original PR:** https://github.com/dreamhunter2333/cloudflare_temp_email/pull/394 **Author:** [@dreamhunter2333](https://github.com/dreamhunter2333) **Created:** 8/11/2024 **Status:** ✅ Merged **Merged:** 8/11/2024 **Merged by:** [@dreamhunter2333](https://github.com/dreamhunter2333) **Base:** `main` ← **Head:** `feature/dev` --- ### 📝 Commits (1) - [`d67d5db`](https://github.com/dreamhunter2333/cloudflare_temp_email/commit/d67d5dbde5300c05ee5ecb3b396c1b17807525fd) feat: add EMAIL_KV_BLACK_LIST ### 📊 Changes **8 files changed** (+48 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -0) 📝 `frontend/package.json` (+1 -1) 📝 `frontend/src/api/index.js` (+1 -1) 📝 `frontend/src/views/admin/AccountSettings.vue` (+14 -1) 📝 `worker/src/admin_api/index.ts` (+10 -2) 📝 `worker/src/constants.ts` (+2 -1) ➕ `worker/src/email/black_list.ts` (+16 -0) 📝 `worker/src/email/index.ts` (+3 -2) </details> ### 📄 Description ### **User description** #379 ___ ### **PR Type** Enhancement, Bug fix ___ ### **Description** - Added a new field `fromBlockList` in the admin account settings to block specific email addresses. - Updated the admin API to handle the new `fromBlockList` field in both GET and POST requests. - Created a new module to check if an email address is blocked and integrated it into the email handling logic. - Fixed a potential error handling issue in the frontend API. - Updated the project version to `0.7.1` and documented the changes in the changelog. ___ ### **Changes walkthrough** 📝 <table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><table> <tr> <td> <details> <summary><strong>AccountSettings.vue</strong><dd><code>Add email address block list field in admin settings</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> frontend/src/views/admin/AccountSettings.vue <li>Added a new field <code>fromBlockList</code> for blocking email addresses.<br> <li> Updated UI to include the new field with translations.<br> <li> Modified data fetching and saving logic to handle the new field.<br> </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/394/files#diff-d5db89bc5b7ac5d009a78d299aa22f0f0414bbbb5006e88b30f35af8510b6b33">+14/-1</a>&nbsp; &nbsp; </td> </tr> <tr> <td> <details> <summary><strong>index.ts</strong><dd><code>Handle fromBlockList in admin API</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> worker/src/admin_api/index.ts <li>Added handling for <code>fromBlockList</code> in GET and POST requests.<br> <li> Integrated new constant <code>EMAIL_KV_BLACK_LIST</code>.<br> </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/394/files#diff-b470c4c47ce4a700cd8aac644d07d8a747d439bb6d69e9392a198b3a931fe2e7">+10/-2</a>&nbsp; &nbsp; </td> </tr> <tr> <td> <details> <summary><strong>constants.ts</strong><dd><code>Define EMAIL_KV_BLACK_LIST constant</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> worker/src/constants.ts <li>Added new constant <code>EMAIL_KV_BLACK_LIST</code>.<br> <li> Updated version to <code>v0.7.1</code>.<br> </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/394/files#diff-cab08ba19c1499ed426fc4918a5613e22eb95c3427c7467ce330f5ee0d69d01e">+2/-1</a>&nbsp; &nbsp; &nbsp; </td> </tr> <tr> <td> <details> <summary><strong>black_list.ts</strong><dd><code>Implement email address blocking logic</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> worker/src/email/black_list.ts - Created a new module to check if an email address is blocked. </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/394/files#diff-ffb8f43a4109030cb3d55a6cb26e7bcb31968b783c391dbdd7337be7e1048a73">+16/-0</a>&nbsp; &nbsp; </td> </tr> <tr> <td> <details> <summary><strong>index.ts</strong><dd><code>Integrate email blocking in email handling</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> worker/src/email/index.ts <li>Integrated <code>isBlocked</code> function to reject emails from blocked addresses.<br> <br> </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/394/files#diff-da1768152a73f37b0a0780d578569f84c3d4bb946294e3a81fb0271302e6d816">+3/-2</a>&nbsp; &nbsp; &nbsp; </td> </tr> </table></td></tr><tr><td><strong>Bug fix</strong></td><td><table> <tr> <td> <details> <summary><strong>index.js</strong><dd><code>Fix potential error handling issue in API</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> frontend/src/api/index.js - Added optional chaining to handle potential undefined `message`. </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/394/files#diff-80f7e17c8e1f299b7316ce792286ebcaab67ed3afc050e3c5019ed33ab61b34b">+1/-1</a>&nbsp; &nbsp; &nbsp; </td> </tr> </table></td></tr><tr><td><strong>Documentation</strong></td><td><table> <tr> <td> <details> <summary><strong>CHANGELOG.md</strong><dd><code>Update changelog for version 0.7.1</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> CHANGELOG.md <li>Updated changelog to include new feature for email block list <br>configuration.<br> </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/394/files#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4ed">+1/-0</a>&nbsp; &nbsp; &nbsp; </td> </tr> </table></td></tr><tr><td><strong>Configuration changes</strong></td><td><table> <tr> <td> <details> <summary><strong>package.json</strong><dd><code>Bump frontend package version to 0.7.1</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> frontend/package.json - Updated version to `0.7.1`. </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/394/files#diff-da6498268e99511d9ba0df3c13e439d10556a812881c9d03955b2ef7c6c1c655">+1/-1</a>&nbsp; &nbsp; &nbsp; </td> </tr> </table></td></tr></tr></tbody></table> ___ > 💡 **PR-Agent usage**: >Comment `/help` on the PR to get a list of all available PR-Agent tools and their descriptions --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
    kerem 2026-02-26 21:31:47 +03:00
    Sign in to join this conversation.
    No milestone
    No project
    No assignees
    1 participant
    Notifications
    Due date
    The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

    No due date set.

    Dependencies

    No dependencies set.

    Reference
    starred/cloudflare_temp_email#558
    No description provided.