@@ -27,7 +27,7 @@ func ToNotificationThread(n *models.Notification) *api.NotificationThread {
27
27
//handle Subject
28
28
switch n .Source {
29
29
case models .NotificationSourceIssue :
30
- result .Subject = & api.NotificationSubject {Type : "Issue" }
30
+ result .Subject = & api.NotificationSubject {Type : api . NotifySubjectIssue }
31
31
if n .Issue != nil {
32
32
result .Subject .Title = n .Issue .Title
33
33
result .Subject .URL = n .Issue .APIURL ()
@@ -38,7 +38,7 @@ func ToNotificationThread(n *models.Notification) *api.NotificationThread {
38
38
}
39
39
}
40
40
case models .NotificationSourcePullRequest :
41
- result .Subject = & api.NotificationSubject {Type : "Pull" }
41
+ result .Subject = & api.NotificationSubject {Type : api . NotifySubjectPull }
42
42
if n .Issue != nil {
43
43
result .Subject .Title = n .Issue .Title
44
44
result .Subject .URL = n .Issue .APIURL ()
@@ -55,13 +55,13 @@ func ToNotificationThread(n *models.Notification) *api.NotificationThread {
55
55
}
56
56
case models .NotificationSourceCommit :
57
57
result .Subject = & api.NotificationSubject {
58
- Type : "Commit" ,
58
+ Type : api . NotifySubjectCommit ,
59
59
Title : n .CommitID ,
60
60
URL : n .Repository .HTMLURL () + "/commit/" + n .CommitID ,
61
61
}
62
62
case models .NotificationSourceRepository :
63
63
result .Subject = & api.NotificationSubject {
64
- Type : "Repository" ,
64
+ Type : api . NotifySubjectRepository ,
65
65
Title : n .Repository .FullName (),
66
66
URL : n .Repository .Link (),
67
67
}
0 commit comments