File tree Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -354,6 +354,7 @@ func (n *Notification) APIFormat() *api.NotificationThread {
354354 if n .Issue != nil {
355355 result .Subject .Title = n .Issue .Title
356356 result .Subject .URL = n .Issue .APIURL ()
357+ result .Subject .State = n .Issue .State ()
357358 comment , err := n .Issue .GetLastComment ()
358359 if err == nil && comment != nil {
359360 result .Subject .LatestCommentURL = comment .APIURL ()
@@ -364,6 +365,7 @@ func (n *Notification) APIFormat() *api.NotificationThread {
364365 if n .Issue != nil {
365366 result .Subject .Title = n .Issue .Title
366367 result .Subject .URL = n .Issue .APIURL ()
368+ result .Subject .State = n .Issue .State ()
367369 comment , err := n .Issue .GetLastComment ()
368370 if err == nil && comment != nil {
369371 result .Subject .LatestCommentURL = comment .APIURL ()
Original file line number Diff line number Diff line change @@ -21,10 +21,11 @@ type NotificationThread struct {
2121
2222// NotificationSubject contains the notification subject (Issue/Pull/Commit)
2323type NotificationSubject struct {
24- Title string `json:"title"`
25- URL string `json:"url"`
26- LatestCommentURL string `json:"latest_comment_url"`
27- Type string `json:"type" binding:"In(Issue,Pull,Commit)"`
24+ Title string `json:"title"`
25+ URL string `json:"url"`
26+ LatestCommentURL string `json:"latest_comment_url"`
27+ Type string `json:"type" binding:"In(Issue,Pull,Commit)"`
28+ State StateType `json:"state"`
2829}
2930
3031// NotificationCount number of unread notifications
Original file line number Diff line number Diff line change 1383513835 "type": "string",
1383613836 "x-go-name": "LatestCommentURL"
1383713837 },
13838+ "state": {
13839+ "$ref": "#/definitions/StateType"
13840+ },
1383813841 "title": {
1383913842 "type": "string",
1384013843 "x-go-name": "Title"
You can’t perform that action at this time.
0 commit comments