Mirror of @tangled.org/core. Running on a Raspberry Pi Zero 2 (Please be gentle).
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

appview/models: add `NotificationTypeUserMentioned` notif type

Signed-off-by: Seongmin Lee <git@boltless.me>

authored by

Seongmin Lee and committed by
Tangled
47c8c79d 1b838bca

+7
+5
appview/models/notifications.go
··· 20 20 NotificationTypeIssueReopen NotificationType = "issue_reopen" 21 21 NotificationTypePullClosed NotificationType = "pull_closed" 22 22 NotificationTypePullReopen NotificationType = "pull_reopen" 23 + NotificationTypeUserMentioned NotificationType = "user_mentioned" 23 24 ) 24 25 25 26 type Notification struct { ··· 64 63 return "git-pull-request-create" 65 64 case NotificationTypeFollowed: 66 65 return "user-plus" 66 + case NotificationTypeUserMentioned: 67 + return "at-sign" 67 68 default: 68 69 return "" 69 70 } ··· 116 113 return prefs.PullCreated // same pref for now 117 114 case NotificationTypeFollowed: 118 115 return prefs.Followed 116 + case NotificationTypeUserMentioned: 117 + return true // always notify on mention 119 118 default: 120 119 return false 121 120 }
+2
appview/pages/templates/notifications/fragments/item.html
··· 54 54 reopened a pull request 55 55 {{ else if eq .Type "followed" }} 56 56 followed you 57 + {{ else if eq .Type "user_mentioned" }} 58 + mentioned you 57 59 {{ else }} 58 60 {{ end }} 59 61 {{ end }}