diff options
author | Ethan Koenig <etk39@cornell.edu> | 2017-05-25 21:38:18 -0400 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2017-05-26 09:38:18 +0800 |
commit | 0c332f0480e9aa72454641afe53aebb3b9ab6e57 (patch) | |
tree | a13b29de28b8f61b9017316d2b5433e2c5ebda96 /models/issue.go | |
parent | 03912ce0142039022481ccf3798ab937e9cf4f0b (diff) | |
download | gitea-0c332f0480e9aa72454641afe53aebb3b9ab6e57.tar.gz gitea-0c332f0480e9aa72454641afe53aebb3b9ab6e57.zip |
Fix activity feed (#1779)
* Fix activity feed
Preserve actions after user/repo name change
* Add missing comment
* Fix migration, and remove fields completely
* Tests
Diffstat (limited to 'models/issue.go')
-rw-r--r-- | models/issue.go | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/models/issue.go b/models/issue.go index 8de6ea9cb9..b78c6ba3f1 100644 --- a/models/issue.go +++ b/models/issue.go @@ -918,14 +918,13 @@ func NewIssue(repo *Repository, issue *Issue, labelIDs []int64, uuids []string) } if err = NotifyWatchers(&Action{ - ActUserID: issue.Poster.ID, - ActUserName: issue.Poster.Name, - OpType: ActionCreateIssue, - Content: fmt.Sprintf("%d|%s", issue.Index, issue.Title), - RepoID: repo.ID, - RepoUserName: repo.Owner.Name, - RepoName: repo.Name, - IsPrivate: repo.IsPrivate, + ActUserID: issue.Poster.ID, + ActUser: issue.Poster, + OpType: ActionCreateIssue, + Content: fmt.Sprintf("%d|%s", issue.Index, issue.Title), + RepoID: repo.ID, + Repo: repo, + IsPrivate: repo.IsPrivate, }); err != nil { log.Error(4, "NotifyWatchers: %v", err) } |