Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
thalia
concrexit
Commits
68098ddf
Verified
Commit
68098ddf
authored
May 30, 2019
by
Sébastiaan Versteeg
Browse files
Add notification title+body to message data
parent
e2f8f12c
Changes
1
Show whitespace changes
Inline
Side-by-side
website/pushnotifications/models.py
View file @
68098ddf
...
...
@@ -149,11 +149,13 @@ class Message(models.Model, metaclass=ModelTranslateMeta):
data
=
kwargs
.
get
(
'data'
,
{})
if
self
.
url
is
not
None
:
data
[
'url'
]
=
self
.
url
data
[
'title'
]
=
self
.
title
data
[
'body'
]
=
str
(
self
.
body
)
message
=
messaging
.
Message
(
notification
=
messaging
.
Notification
(
title
=
self
.
title
,
body
=
str
(
self
.
body
)
,
title
=
data
[
'
title
'
]
,
body
=
data
[
'
body
'
]
,
),
data
=
data
,
android
=
messaging
.
AndroidConfig
(
...
...
Luko van der Maas
@lukomaas
mentioned in commit
17972e45
·
Jun 05, 2019
mentioned in commit
17972e45
mentioned in commit 17972e45f0c56a57527f5d5661969dd8517f978c
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment