forked from forgejo/forgejo
Notification - Step 1 (#523)
* Notification - Step 1 * Add copyright headers * Cache issue and repository on notification model
This commit is contained in:
parent
37eec6c9b7
commit
42904cb98a
5 changed files with 349 additions and 11 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue