remove sent mail from sentbox when block is blacklisted

This commit is contained in:
Kevin Froman 2020-01-28 21:39:01 -06:00
parent 85be8f76e5
commit d303b8252b
6 changed files with 50 additions and 14 deletions

View file

@ -0,0 +1,12 @@
from threading import Thread
from onionrutils import localcommand
def on_blacklist_add(api, data=None):
blacklisted_data = data['data']
def remove():
localcommand.local_command(f'/mail/deletemsg/{blacklisted_data}', post=True)
Thread(target=remove).start()