Onionr/static-data/default-plugins/pms/onblacklist.py

13 lines
282 B
Python
Raw Permalink Normal View History

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()