"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "models/issue_reaction.go" between
gitea-1.13.1.tar.gz and gitea-1.13.2.tar.gz

About: Gitea allows to set up a self-hosted code hosting Git service (a fork of Gogs).

issue_reaction.go  (gitea-1.13.1):issue_reaction.go  (gitea-1.13.2)
skipping to change at line 181 skipping to change at line 181
// CreateCommentReaction creates a reaction on comment. // CreateCommentReaction creates a reaction on comment.
func CreateCommentReaction(doer *User, issue *Issue, comment *Comment, content s tring) (*Reaction, error) { func CreateCommentReaction(doer *User, issue *Issue, comment *Comment, content s tring) (*Reaction, error) {
return CreateReaction(&ReactionOptions{ return CreateReaction(&ReactionOptions{
Type: content, Type: content,
Doer: doer, Doer: doer,
Issue: issue, Issue: issue,
Comment: comment, Comment: comment,
}) })
} }
func deleteReaction(e *xorm.Session, opts *ReactionOptions) error { func deleteReaction(e Engine, opts *ReactionOptions) error {
reaction := &Reaction{ reaction := &Reaction{
Type: opts.Type, Type: opts.Type,
UserID: opts.Doer.ID, }
IssueID: opts.Issue.ID, if opts.Doer != nil {
reaction.UserID = opts.Doer.ID
}
if opts.Issue != nil {
reaction.IssueID = opts.Issue.ID
} }
if opts.Comment != nil { if opts.Comment != nil {
reaction.CommentID = opts.Comment.ID reaction.CommentID = opts.Comment.ID
} }
_, err := e.Where("original_author_id = 0").Delete(reaction) _, err := e.Where("original_author_id = 0").Delete(reaction)
return err return err
} }
// DeleteReaction deletes reaction for issue or comment. // DeleteReaction deletes reaction for issue or comment.
func DeleteReaction(opts *ReactionOptions) error { func DeleteReaction(opts *ReactionOptions) error {
 End of changes. 2 change blocks. 
4 lines changed or deleted 8 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)