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

Notification - Step 1 (#523)

* Notification - Step 1

* Add copyright headers

* Cache issue and repository on notification model
This commit is contained in:
Andrey Nering
2016-12-30 14:44:54 -02:00
committed by Lunny Xiao
parent 37eec6c9b7
commit 42904cb98a
5 changed files with 349 additions and 11 deletions

View File

@@ -443,8 +443,16 @@ func (issue *Issue) GetAssignee() (err error) {
}
// ReadBy sets issue to be read by given user.
func (issue *Issue) ReadBy(uid int64) error {
return UpdateIssueUserByRead(uid, issue.ID)
func (issue *Issue) ReadBy(userID int64) error {
if err := UpdateIssueUserByRead(userID, issue.ID); err != nil {
return err
}
if err := setNotificationStatusRead(x, userID, issue.ID); err != nil {
return err
}
return nil
}
func updateIssueCols(e Engine, issue *Issue, cols ...string) error {