twenty
twenty copied to clipboard
Create blocklist model and connect the frontend
Scope & Context
Currently, we display mock data for the blocklist in the frontend.
Technical inputs
Create blocklist data model:
- id, createdAt, updatedAt
- handle - string
- workspaceMemberId - string, foreign key, not null
Connect frontend
In Settings/Accounts/Emails Query, create and delete records.
- useFindManyRecords
- useCreateOneRecord
- useDeleteOneRecord
Backend logic
- When emails are fetched in GmailSync services, fetch block-list and filter out messages based on their recipients.
- When a new item is added to the blocklist, deleted existing messages that match with the handle