remove sent mail from sentbox when block is blacklisted
This commit is contained in:
parent
85be8f76e5
commit
d303b8252b
6 changed files with 50 additions and 14 deletions
12
static-data/default-plugins/pms/onblacklist.py
Normal file
12
static-data/default-plugins/pms/onblacklist.py
Normal 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()
|
Loading…
Add table
Add a link
Reference in a new issue