@@ -27,7 +27,7 @@ func ToNotificationThread(n *models.Notification) *api.NotificationThread {
2727 //handle Subject
2828 switch n .Source {
2929 case models .NotificationSourceIssue :
30- result .Subject = & api.NotificationSubject {Type : "Issue" }
30+ result .Subject = & api.NotificationSubject {Type : api . NotifySubjectIssue }
3131 if n .Issue != nil {
3232 result .Subject .Title = n .Issue .Title
3333 result .Subject .URL = n .Issue .APIURL ()
@@ -38,7 +38,7 @@ func ToNotificationThread(n *models.Notification) *api.NotificationThread {
3838 }
3939 }
4040 case models .NotificationSourcePullRequest :
41- result .Subject = & api.NotificationSubject {Type : "Pull" }
41+ result .Subject = & api.NotificationSubject {Type : api . NotifySubjectPull }
4242 if n .Issue != nil {
4343 result .Subject .Title = n .Issue .Title
4444 result .Subject .URL = n .Issue .APIURL ()
@@ -55,13 +55,13 @@ func ToNotificationThread(n *models.Notification) *api.NotificationThread {
5555 }
5656 case models .NotificationSourceCommit :
5757 result .Subject = & api.NotificationSubject {
58- Type : "Commit" ,
58+ Type : api . NotifySubjectCommit ,
5959 Title : n .CommitID ,
6060 URL : n .Repository .HTMLURL () + "/commit/" + n .CommitID ,
6161 }
6262 case models .NotificationSourceRepository :
6363 result .Subject = & api.NotificationSubject {
64- Type : "Repository" ,
64+ Type : api . NotifySubjectRepository ,
6565 Title : n .Repository .FullName (),
6666 URL : n .Repository .Link (),
6767 }
0 commit comments