{{ $state := . }} {{ range $i, $activity := .Activities}}
{{ if $activity.Comment }}
{{ if and (not $state.User) (not $state.Query) }} comment on {{ end }} {{ $activity.Comment.P.Post.Name}} in c/{{ if $state.HideInstanceNames -}} {{ $activity.Comment.P.Community.Name }} {{ else -}} {{ fullcname $activity.Comment.P.Community }} {{ end }}
{{ template "comment.html" $activity.Comment }} {{ else if $activity.Post }} {{ template "post.html" $activity.Post }} {{ else if $activity.Message }}
{{ if eq $activity.Message.Creator.ID $state.Session.UserID }} message to {{- if $state.HideInstanceNames -}} {{ $activity.Message.Recipient.Name }} {{- else -}} {{ fullname $activity.Message.Recipient }} {{- end -}} {{ else }} message from {{- if $state.HideInstanceNames -}} {{ $activity.Message.Creator.Name }} {{- else -}} {{ fullname $activity.Message.Creator }} {{- end -}} {{end}} sent {{ humanize $activity.Message.PrivateMessage.Published.Time }}
{{ markdown "" $activity.Message.PrivateMessage.Content }}
{{ end }}
{{ end }}