-
Notifications
You must be signed in to change notification settings - Fork 24
Feat/blocklist #269
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
base: staging
Are you sure you want to change the base?
Feat/blocklist #269
Conversation
- all blocks are now block and delete - lift method to store
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
inside flushWalletHistory, should we allow also delete blocking list?
if not, deleteTenant on the blockedAddress repository seems not useful
| <div> | ||
| <div className="text-xs font-medium tracking-wide text-[var(--text-secondary)] uppercase"> | ||
| Address | ||
| export const ContactInfoModal: FC<ContactInfoModalProps> = ({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| // Skip processing historical data for blocked addresses | ||
| const blocklistStore = useBlocklistStore.getState(); | ||
| if (blocklistStore.blockedAddresses.has(senderAddress)) { | ||
| console.log( | ||
| `Skipping historical handshake processing for blocked address: ${senderAddress}` | ||
| ); | ||
| return; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can filter out a bit earlier in the flow to avoid potentially expensive computation (decryption).
HistoricalSyncer could take blockedAddress repository as parameter and filter out ignored participants (as early as possible). Or, if you want messaging store to still keep this responsibility, one filter per direction (sent/received) in each loop (line 413 and line 462)

what?
initial 'block a contact' feature
adds:
ability to block from broadcasts or directs contact info pane
ability to see blocked addresses and a broadcast vis option in settings
stores the blocked address in db (also has the capacity for a 'reason') - note: my initial version included a reason field and allowed users to block an address straight from the settings, but I removed this as it was a little complicated handling the visibility states etc. So atm, we have no UI to add a reason and no way to block a contact unless its on their contact card.
blocking will delete any in db contact or messages. BUT in bcasts you will either still see a "Blocked Contact" message or no message (depending on your settings)
also adds
kasia-generalas a default initial channel. users can block now so this seems reasonable?