work on mail settings
This commit is contained in:
parent
6f0ef390a7
commit
862c6f2ea4
5 changed files with 11 additions and 9 deletions
|
@ -59,6 +59,7 @@ def on_insertblock(api, data={}):
|
|||
|
||||
|
||||
def on_processblocks(api, data=None):
|
||||
print('mail got block', data)
|
||||
if data['type'] != 'pm':
|
||||
return
|
||||
data['block'].decrypt()
|
||||
|
@ -72,6 +73,8 @@ def on_processblocks(api, data=None):
|
|||
else:
|
||||
signer = signer[:5]
|
||||
|
||||
print('detected mail', data['block'].hash)
|
||||
if data['block'].decrypted:
|
||||
config.reload()
|
||||
if config.get('mail.notificationSetting', True):
|
||||
notifier.notification_with_sound(title="Onionr Mail - New Message", message="From: %s\n\nSubject: %s" % (signer, metadata['subject']))
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
"minimum_send_pow": 4,
|
||||
"public_key": "",
|
||||
"random_bind_ip": false,
|
||||
"security_level": 0,
|
||||
"security_level": 1,
|
||||
"show_notifications": true,
|
||||
"socket_servers": false,
|
||||
"store_plaintext_blocks": true,
|
||||
|
@ -72,4 +72,4 @@
|
|||
"ui": {
|
||||
"theme": "dark"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue