1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Only show sender if it makes sense (#9601)

Signed-off-by: jolheiser <john.olheiser@gmail.com>
This commit is contained in:
John Olheiser
2020-01-04 16:20:15 -06:00
committed by zeripath
parent 07439d8059
commit fb3a6aba7d
7 changed files with 71 additions and 65 deletions

View File

@@ -125,7 +125,7 @@ func getTelegramPushPayload(p *api.PushPayload) (*TelegramPayload, error) {
}
func getTelegramIssuesPayload(p *api.IssuePayload) (*TelegramPayload, error) {
text, _, attachmentText, _ := getIssuesPayloadInfo(p, htmlLinkFormatter)
text, _, attachmentText, _ := getIssuesPayloadInfo(p, htmlLinkFormatter, true)
return &TelegramPayload{
Message: text + "\n\n" + attachmentText,
@@ -133,7 +133,7 @@ func getTelegramIssuesPayload(p *api.IssuePayload) (*TelegramPayload, error) {
}
func getTelegramIssueCommentPayload(p *api.IssueCommentPayload) (*TelegramPayload, error) {
text, _, _ := getIssueCommentPayloadInfo(p, htmlLinkFormatter)
text, _, _ := getIssueCommentPayloadInfo(p, htmlLinkFormatter, true)
return &TelegramPayload{
Message: text + "\n" + p.Comment.Body,
@@ -141,7 +141,7 @@ func getTelegramIssueCommentPayload(p *api.IssueCommentPayload) (*TelegramPayloa
}
func getTelegramPullRequestPayload(p *api.PullRequestPayload) (*TelegramPayload, error) {
text, _, attachmentText, _ := getPullRequestPayloadInfo(p, htmlLinkFormatter)
text, _, attachmentText, _ := getPullRequestPayloadInfo(p, htmlLinkFormatter, true)
return &TelegramPayload{
Message: text + "\n" + attachmentText,
@@ -166,7 +166,7 @@ func getTelegramRepositoryPayload(p *api.RepositoryPayload) (*TelegramPayload, e
}
func getTelegramReleasePayload(p *api.ReleasePayload) (*TelegramPayload, error) {
text, _ := getReleasePayloadInfo(p, htmlLinkFormatter)
text, _ := getReleasePayloadInfo(p, htmlLinkFormatter, true)
return &TelegramPayload{
Message: text + "\n",