stop appending previous version

This commit is contained in:
Erik Winter 2022-04-02 10:08:59 +02:00
parent 413c0c068e
commit 6aea2e9c40
2 changed files with 1 additions and 4 deletions

View File

@ -201,9 +201,6 @@ func (t *Task) FormatBody() string {
body += fmt.Sprintf("%s\r\n", line) body += fmt.Sprintf("%s\r\n", line)
} }
if t.Message != nil {
body += fmt.Sprintf("\r\nPrevious version:\r\n\r\n%s\r\n", t.Message.Body)
}
return body return body
} }

View File

@ -348,7 +348,7 @@ func TestFormatBody(t *testing.T) {
Body: "previous body", Body: "previous body",
}, },
}, },
exp: "\r\naction: an action\r\ndue: 2021-01-30 (saturday)\r\nproject: project\r\nversion: 6\r\nid: an id\r\ndone: true\r\n\r\nPrevious version:\r\n\r\nprevious body\r\n", exp: "\r\naction: an action\r\ndue: 2021-01-30 (saturday)\r\nproject: project\r\nversion: 6\r\nid: an id\r\ndone: true\r\n",
}, },
} { } {
t.Run(tc.name, func(t *testing.T) { t.Run(tc.name, func(t *testing.T) {