From 164a2954012bae77cab6c53b367f910e14f2089b Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Thu, 14 May 2020 23:58:49 -0400 Subject: [PATCH] show chatter attachments --- views/chatter.html | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/views/chatter.html b/views/chatter.html index 3a736e4..5d53284 100644 --- a/views/chatter.html +++ b/views/chatter.html @@ -26,6 +26,27 @@ chatter: {{ .Target }}

{{ .Date.Local.Format "15:04" }} {{ .Handle }}: {{ .HTML }} +{{ range .Donks }} +{{ if .Local }} +{{ if eq .Media "text/plain" }} +

Attachment: {{ .Name }}{{ if not (eq .Desc .Name) }} {{ .Desc }}{{ end }} +{{ else if eq .Media "application/pdf" }} +

Attachment: {{ .Name }}{{ if not (eq .Desc .Name) }} {{ .Desc }}{{ end }} +{{ else }} +

{{ .Desc }} +{{ end }} +{{ else }} +{{ if .XID }} +

External Attachment: {{ .Name }}{{ if not (eq .Desc .Name) }} {{ .Desc }}{{ end }} +{{ else }} +{{ if eq .Media "video/mp4" }} +

+{{ else }} +

{{ .Desc }} +{{ end }} +{{ end }} +{{ end }} +{{ end }} {{ end }}