aboutsummaryrefslogtreecommitdiffstats
path: root/models/notification.go
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2020-09-21 01:10:53 +0200
committerGitHub <noreply@github.com>2020-09-20 19:10:53 -0400
commit2dbca92a0f145ddf6d0e3d4487be28071f6fd792 (patch)
treeadbf05dd475f3504683cddb95e52ad42aa7210ce /models/notification.go
parent3f9eb93cc6f7de012d25ec17be510a448a6f6042 (diff)
downloadgitea-2dbca92a0f145ddf6d0e3d4487be28071f6fd792.tar.gz
gitea-2dbca92a0f145ddf6d0e3d4487be28071f6fd792.zip
API: NotificationSubject show Issue/Pull State (#12901)
Diffstat (limited to 'models/notification.go')
-rw-r--r--models/notification.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/models/notification.go b/models/notification.go
index 80d837078a..1f51c99c4c 100644
--- a/models/notification.go
+++ b/models/notification.go
@@ -354,6 +354,7 @@ func (n *Notification) APIFormat() *api.NotificationThread {
if n.Issue != nil {
result.Subject.Title = n.Issue.Title
result.Subject.URL = n.Issue.APIURL()
+ result.Subject.State = n.Issue.State()
comment, err := n.Issue.GetLastComment()
if err == nil && comment != nil {
result.Subject.LatestCommentURL = comment.APIURL()
@@ -364,6 +365,7 @@ func (n *Notification) APIFormat() *api.NotificationThread {
if n.Issue != nil {
result.Subject.Title = n.Issue.Title
result.Subject.URL = n.Issue.APIURL()
+ result.Subject.State = n.Issue.State()
comment, err := n.Issue.GetLastComment()
if err == nil && comment != nil {
result.Subject.LatestCommentURL = comment.APIURL()