From 47c8c79d8406e06940bf5498851806d87d0605cf Mon Sep 17 00:00:00 2001 From: Seongmin Lee Date: Fri, 31 Oct 2025 18:56:13 +0000 Subject: [PATCH] appview/models: add `NotificationTypeUserMentioned` notif type Signed-off-by: Seongmin Lee --- appview/models/notifications.go | 5 +++++ appview/pages/templates/notifications/fragments/item.html | 2 ++ 2 file(s) changed, 7 insertion(s)(+), 0 deletion(s)(-) diff --git a/appview/models/notifications.go b/appview/models/notifications.go --- a/appview/models/notifications.go +++ b/appview/models/notifications.go @@ -20,6 +20,7 @@ NotificationTypeIssueReopen NotificationType = "issue_reopen" NotificationTypePullClosed NotificationType = "pull_closed" NotificationTypePullReopen NotificationType = "pull_reopen" + NotificationTypeUserMentioned NotificationType = "user_mentioned" ) type Notification struct { @@ -63,6 +64,8 @@ return "git-pull-request-create" case NotificationTypeFollowed: return "user-plus" + case NotificationTypeUserMentioned: + return "at-sign" default: return "" } @@ -113,6 +116,8 @@ return prefs.PullCreated // same pref for now case NotificationTypeFollowed: return prefs.Followed + case NotificationTypeUserMentioned: + return true // always notify on mention default: return false } diff --git a/appview/pages/templates/notifications/fragments/item.html b/appview/pages/templates/notifications/fragments/item.html --- a/appview/pages/templates/notifications/fragments/item.html +++ b/appview/pages/templates/notifications/fragments/item.html @@ -54,6 +54,8 @@ reopened a pull request {{ else if eq .Type "followed" }} followed you + {{ else if eq .Type "user_mentioned" }} + mentioned you {{ else }} {{ end }} {{ end }} -- tangled.sh