Template API Documentation + SMS Processing
medcelerate opened this issue · comments
It would be great t have documentation on what values are exposed to liquid in what contexts. I have also noticed that with 1.3.0 it doesn't seem to evaluate the notification.body for sms templates, only the subject. For loops also render as text and are not computed.
Yes, makes sense. In another project I just created an endpoint for that, which can then be used in an integrated help and for auto completion.
In the latest version it is much more unified: https://github.com/notifo-io/notifo/blob/main/backend/src/Notifo.Domain/Liquid/LiquidContext.cs
But in 1.3.0 it is only this one: https://github.com/notifo-io/notifo/blob/1.3.0/backend/src/Notifo.Domain/Channels/Sms/SmsFormatter.cs#L53, which also has not changed that much: https://github.com/notifo-io/notifo/blob/1.2.0/backend/src/Notifo.Domain/Channels/Sms/SmsFormatter.cs
You have to use the current dev version.
Seems like there is a validation error with the current dev version on the sms page, saying text field is required but the API request is sending the text field.
I have fixed that.
Is it in a new build that has this fix? I'm using the latest from notifo-dev.
Should be part of the notifo-dev:1481 tag.
Yes, fixed, thanks!
I pushed an improvement where I added a list of properties to sms template page with some other fixes.