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_comment.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_comment.go')
-rw-r--r-- | models/issue_comment.go | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/models/issue_comment.go b/models/issue_comment.go index a65abfe012..69edf28f54 100644 --- a/models/issue_comment.go +++ b/models/issue_comment.go @@ -329,13 +329,12 @@ func createComment(e *xorm.Session, opts *CreateCommentOptions) (_ *Comment, err // Compose comment action, could be plain comment, close or reopen issue/pull request. // This object will be used to notify watchers in the end of function. act := &Action{ - ActUserID: opts.Doer.ID, - ActUserName: opts.Doer.Name, - Content: fmt.Sprintf("%d|%s", opts.Issue.Index, strings.Split(opts.Content, "\n")[0]), - RepoID: opts.Repo.ID, - RepoUserName: opts.Repo.Owner.Name, - RepoName: opts.Repo.Name, - IsPrivate: opts.Repo.IsPrivate, + ActUserID: opts.Doer.ID, + ActUser: opts.Doer, + Content: fmt.Sprintf("%d|%s", opts.Issue.Index, strings.Split(opts.Content, "\n")[0]), + RepoID: opts.Repo.ID, + Repo: opts.Repo, + IsPrivate: opts.Repo.IsPrivate, } // Check comment type. |