Commit 3cd7b430 authored by Luko van der Maas's avatar Luko van der Maas

Merge branch 'feature/app-notification-data' into 'master'

Add notification title+body to message data

See merge request !1279
parents 075c28d4 68098ddf
...@@ -149,11 +149,13 @@ class Message(models.Model, metaclass=ModelTranslateMeta): ...@@ -149,11 +149,13 @@ class Message(models.Model, metaclass=ModelTranslateMeta):
data = kwargs.get('data', {}) data = kwargs.get('data', {})
if self.url is not None: if self.url is not None:
data['url'] = self.url data['url'] = self.url
data['title'] = self.title
data['body'] = str(self.body)
message = messaging.Message( message = messaging.Message(
notification=messaging.Notification( notification=messaging.Notification(
title=self.title, title=data['title'],
body=str(self.body), body=data['body'],
), ),
data=data, data=data,
android=messaging.AndroidConfig( android=messaging.AndroidConfig(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment