GIFs showing correctly in Notifications

This commit is contained in:
Noah Petherbridge 2023-06-25 23:09:43 -07:00
parent 7d4326e251
commit 7aa2310a6d

View File

@ -411,9 +411,16 @@
<!-- Attached photo? --> <!-- Attached photo? -->
{{if $Body.PhotoID}} {{if $Body.PhotoID}}
<div class="column is-one-quarter"> <div class="column is-one-quarter">
<!-- GIF video? -->
{{if HasSuffix $Body.Photo.Filename ".mp4"}}
<video autoplay loop controls>
<source src="{{PhotoURL $Body.Photo.Filename}}" type="video/mp4">
</video>
{{else}}
<a href="/photo/view?id={{$Body.Photo.ID}}"> <a href="/photo/view?id={{$Body.Photo.ID}}">
<img src="{{PhotoURL $Body.Photo.Filename}}"> <img src="{{PhotoURL $Body.Photo.Filename}}">
</a> </a>
{{end}}
{{if $Body.Photo.Caption}} {{if $Body.Photo.Caption}}
<small>{{$Body.Photo.Caption}}</small> <small>{{$Body.Photo.Caption}}</small>