{{ $state := . }} {{ range $i, $activity := .Activities}}
{{ if $activity.Comment }}
{{ if and (not $state.User) (not $state.Query) }} comment on {{ end }} {{ $activity.Comment.P.Post.Name}} {{ if $state.User}} by {{$state.User.PersonView.Person.Name }} {{ end }} 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 }}
message {{ if eq $activity.Message.Creator.ID $state.Session.UserID }} to {{- if $state.HideInstanceNames -}} {{ $activity.Message.Recipient.Name }} {{- else -}} {{ fullname $activity.Message.Recipient }} {{- end -}} {{ else }} from {{- if $state.HideInstanceNames -}} {{ $activity.Message.Creator.Name }} {{- else -}} {{ fullname $activity.Message.Creator }} {{- end -}} {{end}} sent {{ humanize $activity.Message.PrivateMessage.Published }}
{{ markdown "" $activity.Message.PrivateMessage.Content }}
{{ end }}
{{ end }}