Commit f034214
Implement Mastodon 4.5.0 quote notification types
Add support for 'quote' and 'quoted_update' notification types
introduced in Mastodon 4.5.0 (API v7) to improve quote post
interaction tracking.
New notification types:
- 'quote': Notifies when someone quotes your post, showing the
quote post itself
- 'quoted_update': Notifies when a post you quoted is edited,
showing your quote post for context
Both types are non-groupable (individual notifications) and
self-quotes don't generate notifications. Existing quote posts
are automatically backfilled with notifications during migration.
Database changes:
- Added 'quote' and 'quoted_update' to notification_type enum
- Added partial index on posts.quote_target_id for performance
- Single migration with explicit COMMIT for enum and backfill
Implementation:
- src/notification.ts: New createQuoteNotification and
createQuotedUpdateNotifications functions
- src/federation/inbox.ts: Quote notification creation in
onPostCreated and onPostUpdated handlers
- src/api/v1/notifications.ts, src/api/v2/notifications.ts:
Added new types to API endpoints
- src/notification.test.ts: 7 test cases covering all scenarios
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>1 parent ffee1a6 commit f034214
File tree
10 files changed
+4350
-1
lines changed- drizzle
- meta
- src
- api
- v1
- v2
- federation
10 files changed
+4350
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
100 | 120 | | |
101 | 121 | | |
102 | 122 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
0 commit comments