Skip to content

Conversation

@HocusLocusTee
Copy link
Collaborator

@HocusLocusTee HocusLocusTee commented Oct 17, 2025

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-general as a default initial channel. users can block now so this seems reasonable?

- tidy up var names
- some styling
- load block list before handshakes
- really make sure we dont get handshakes for blocked messages
- all blocks are now block and delete
- lift method to store
Copy link
Contributor

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> = ({
Copy link
Contributor

Choose a reason for hiding this comment

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

What do you think on placing the block button here instead?

Image

Comment on lines +531 to +538
// 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;
}
Copy link
Contributor

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants