{{define "chatActivity"}}
{{template "chatActivityCards" .}}
{{end}} {{define "chatActivityResponse"}}
{{template "chatActivityCards" .}}
{{end}} {{define "chatActivityCards"}}{{if .Error}}

{{.Error}}

{{else}}{{range .Items}}
{{if eq .Type "approval"}}{{if ne .State "open"}}
{{.Title}} {{if .Decision}}{{.Decision}}{{else}}{{.State}}{{end}}{{end}}
{{if .Question}}Question{{else}}Approval request{{end}} {{if .Decision}}{{.Decision}}{{else}}{{.State}}{{end}}

{{.Title}}

{{if ne .Title .Content}}
Details

{{.Content}}

{{end}}

from {{template "nostrName" .Author}} Open request

{{with .Answer}}
{{.}}
{{end}}{{if .CanDecide}}{{if .Question}}{{else}}{{end}}{{end}}{{if ne .State "open"}}
{{end}} {{else}}
{{.Title}} {{.Status}}

{{template "nostrName" .Author}}

{{chatMarkdown .Content}}
{{with .Result}}{{if .Content}}

Result

{{chatMarkdown .Content}}
{{end}}

Open result

{{end}}

Open task

{{end}}
{{end}}{{end}}{{end}}