stakwork / sphinx-rs

Rust crates for Sphinx Chat
0 stars 0 forks source link

New binding for DELETE contact #51

Closed tomastiminskas closed 2 weeks ago

tomastiminskas commented 3 weeks ago

Right now delete contact feature is disabled. As we discussed we might need a new binding that would delete the contact from the state and publish to LSP to delete all messages for that contact, so fetching new messages or restoring won't restore that contact again.

Receiving a new message from that contact will make it show up again in the dashboard.

@Evanfeenstra tagging you here since I can't assign tickets in this repo

Evanfeenstra commented 3 weeks ago

before this the mixer needs to store highest onion index separately, instead of counting up existing onions before writing a new one

Evanfeenstra commented 3 weeks ago

delete_msgs route can either take a pubkey of your contact, or a list of msg_idxs. If both are included, then only the msg_idxs are used.

You will need to call twice for a contact: once to delete incoming payments for that contact, because those go to okkey. So send that list in msg_idxs. Then call again with the pubkey of the contact to completely delete all records related to your child key for that contact