Definitely possible, but not the way you're trying to do it. You should change the short notification templates in the templates folder.
i only want to do for sms not for firebase notification if there a way to add logic to template?
No, in that case it's not possible.
i have this in .vm throw erorr
#set($subject = "$device.name: moving")
$device.name moving at $dateTool.format("YYYY-MM-dd HH:mm:ss", $event.eventTime, $locale, $timezone)
$position.latitude
Are you going to share the error?
How to send title or subject of template/shorts/deviceOnline.vm
<entry key='notificator.types'>web,mail,sms</entry>
<entry key='sms.http.url'>https://api.myserver.com/v1/messages</entry>
<entry key='sms.http.user'>[YOUR TOKEN ID]</entry>
<entry key='sms.http.password'>[YOUR TOKEN SECRET]</entry>
<entry key='sms.http.template'>
{
"to": "{phone}",
"body": "{subject}\n{message}"
}
</entry>
but i am getting..
{subject}
my scooter online at 2022-12-27 19:21:01
As I already said, you cannot add anything else to the configuration template. You have to change the template file instead.
yes but i want value from template
here in my vim file
#set($subject = "Fuel drop at $position.address ")
$device.name fuel drop at $dateTool.format("HH:mm", $event.eventTime, $locale, >
i want to get set $subject value to send sms
<entry key='sms.http.template'>
{
"to": "{phone}",
"body": "{subject}\n{message}"
}
</entry>
In case you're still not clear about the answer, it's not possible.
haha ok
I am send some notification to my next server. I want to send latitude and longitude also. if this possible?
<entry key='notificator.types'>web,mail,sms</entry> <entry key='sms.http.url'>https://api.myserver.com/v1/messages</entry> <entry key='sms.http.user'>[YOUR TOKEN ID]</entry> <entry key='sms.http.password'>[YOUR TOKEN SECRET]</entry> <entry key='sms.http.template'> { "to": "{phone}", "body": "{message} at {{latitude}},{{longitude}}" } </entry>
How to get lat and log there?
If possible let me know, THANKS IN ADVANCE