Monorepo for Tangled tangled.org

appview/notify/db: set hard-limit to @-mention notification #759

merged opened by boltless.me targeting master from feat/mentions
Labels

None yet.

assignee

None yet.

Participants 1
AT URI
at://did:plc:xasnlahkri4ewmbuzly2rlc5/sh.tangled.repo.pull/3m4vklvknsb22
+7
Diff #6
+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 ··· 421 425 issueId *int64, 422 426 pullId *int64, 423 427 ) { 428 + if eventType == models.NotificationTypeUserMentioned && len(recipients) > maxMentions { 429 + recipients = recipients[:maxMentions] 430 + } 424 431 recipientSet := make(map[syntax.DID]struct{}) 425 432 for _, did := range recipients { 426 433 // everybody except actor themselves

History

7 rounds 0 comments
sign up or login to add to the discussion
1 commit
expand
appview/notify/db: set hard-limit to @-mention notification
expand 0 comments
pull request successfully merged
1 commit
expand
appview/notify/db: set hard-limit to @-mention notification
expand 0 comments
1 commit
expand
appview/notify/db: set hard-limit to @-mention notification
expand 0 comments
1 commit
expand
appview/notify/db: set hard-limit to @-mention notification
expand 0 comments
1 commit
expand
appview/notify/db: set hard-limit to @-mention notification
expand 0 comments
1 commit
expand
appview/notify/db: set hard-limit to @-mention notification
expand 0 comments
1 commit
expand
appview/notify/db: set hard-limit to @-mention notification
expand 0 comments