Add thumb to android notification

This commit is contained in:
JonnyWong16 2017-04-19 22:04:02 -07:00
parent 41caaa7730
commit 014cac7789
2 changed files with 55 additions and 47 deletions

View file

@ -707,9 +707,17 @@ class ANDROIDAPP(Notifier):
else:
device = device[0]
plaintext_data = {'subject': subject.encode("utf-8"),
if kwargs.get('parameters', {}).get('media_type'):
pretty_metadata = PrettyMetadata(kwargs['parameters'])
thumb = pretty_metadata.parameters.get('thumb','')
else:
thumb = ''
plaintext_data = {'notification_id': notification_id,
'subject': subject.encode("utf-8"),
'body': body.encode("utf-8"),
'priority': self.config['priority']}
'priority': self.config['priority'],
'thumb': thumb}
#logger.debug("Plaintext data: {}".format(plaintext_data))