diff --git a/internal/templates/content.go b/internal/templates/content.go index d703e62..acdc911 100644 --- a/internal/templates/content.go +++ b/internal/templates/content.go @@ -37,10 +37,12 @@ var templatesMap = map[string]string{ // Profile // -var profileGet = `Name: hacker -{{ if .Params.TelegramID }}Telegram ID: 12345678 +var profileGet = `Name: {{ .Name }} +{{ if .Params.TelegramID }}Telegram ID: {{ .Params.TelegramID }} {{ end -}} -API token: 00112233445566778899aabbccddeeff +{{ if .Params.LarkUserID }}Lark ID: {{ .Params.LarkUserID }} +{{ end -}} +API token: {{ .Params.APIToken }} Admin: {{ .IsAdmin }}` // @@ -128,7 +130,7 @@ const ( NotificationBodyID = "notification/body" ) -var notificationHeader = `[{{ .Payload.Name }}] {{ .Event.Protocol.String | upper }} from 100.100.100.100:12345 {{ .Event.ReceivedAt.Format "on 02 Jan 2006 at 15:04:05 MST" }}` +var notificationHeader = `[{{ .Payload.Name }}] {{ .Event.Protocol.String | upper }} from {{ .Event.RemoteAddr }} {{ .Event.ReceivedAt.Format "on 02 Jan 2006 at 15:04:05 MST" }}` var notificationBody = `
 {{ printf "%s" .Event.RW }}
 
`