1
0
Fork 0
forked from forgejo/forgejo

Add an updated_at field to the API call for issue's attachment creation

The update date is applied to the issue's comment created to inform
about the modification of the issue's content, and is set as the
asset creation date.
This commit is contained in:
fluzz 2023-06-05 19:08:52 +02:00
parent ea36cf80f5
commit 96150971ca
5 changed files with 45 additions and 6 deletions

View file

@ -274,8 +274,12 @@ func ChangeIssueContent(issue *Issue, doer *user_model.User, content string) (er
return fmt.Errorf("UpdateIssueCols: %w", err)
}
historyDate := timeutil.TimeStampNow()
if issue.NoAutoTime {
historyDate = issue.UpdatedUnix
}
if err = SaveIssueContentHistory(ctx, doer.ID, issue.ID, 0,
timeutil.TimeStampNow(), issue.Content, false); err != nil {
historyDate, issue.Content, false); err != nil {
return fmt.Errorf("SaveIssueContentHistory: %w", err)
}