Template variables
Hi guys, I am using v8 locally, and have created a very simple Vue web application using
embed.umd.min.js
to view the in-app notifications and axios
to trigger simple notifications.
If I create a very simple template, with a title of 'Hello {{a}}' and trigger an event with the following payload:
I get a notification that just says 'Hello ' and the passed payload attribute is not included, but what is interesting is that I noticed the following payload returned from the API is (note that the a
attribute is missing)
If I update the title of the in-app notification to 'Hello {{b}}' and trigger the very same event, I see the same text in the notification 'Hello ' and the following payload returned by the API is:
Each time, the variable included in the template is removed from the payload that is saved to mongodb. Am I doing something wrong?
The request is13 Replies
And the API response is
The template is:
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Hi! Are you using the self hosted version? Also, could you please check what happens if you put something in the default value (in the variables table at the bottom)?
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
If a default value is configured that value willl be displayed in the outputted message regardless of sending the attribute in the payload.
If the value is marked as required, an error will be returned if the value is not sent it the payload, but regardless, the value if sent will not be displayed.
Yes, this was already fixed, today-tomorrow v0.9.0 will be released and you should not have this problem anymore
That is great news, thank you very much for your help.
@dmulligan, you just advanced to level 1!
Just to update, this is confirmed as fixed in v0.9, thanks again for your help.
Thanks for the update!