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/notify/db: set hard-limit to @-mention notification

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

authored by

Seongmin Lee and committed by
Tangled
428c002e 9ac20f5c

+7
+7
appview/notify/db/db.go
··· 13 13 "tangled.org/core/idresolver" 14 14 ) 15 15 16 + const ( 17 + maxMentions = 5 18 + ) 19 + 16 20 type databaseNotifier struct { 17 21 db *db.DB 18 22 res *idresolver.Resolver ··· 425 421 issueId *int64, 426 422 pullId *int64, 427 423 ) { 424 + if eventType == models.NotificationTypeUserMentioned && len(recipients) > maxMentions { 425 + recipients = recipients[:maxMentions] 426 + } 428 427 recipientSet := make(map[syntax.DID]struct{}) 429 428 for _, did := range recipients { 430 429 // everybody except actor themselves