feat(api): Finish push notification delivery

This commit is contained in:
Jesse Wierzbinski 2025-01-02 02:45:40 +01:00
parent d096ab830c
commit d839c274b1
No known key found for this signature in database
12 changed files with 457 additions and 9 deletions

View file

@ -247,6 +247,20 @@ expiration = 300 # 5 minutes
# Leave this empty to generate a new key
key = ""
[notifications]
[notifications.push]
# Whether to enable push notifications
enabled = true
[notifications.push.vapid]
# VAPID keys for push notifications
# Run Versia Server with those values missing to generate new keys
public = ""
private = ""
# Optional
# subject = "mailto:joe@example.com"
[defaults]
# Default visibility for new notes
# Can be public, unlisted, private or direct
@ -262,27 +276,34 @@ language = "en"
placeholder_style = "thumbs"
[queues]
# Control the delivery queue (for outbound federation)
# Controls the delivery queue (for outbound federation)
[queues.delivery]
# Time in seconds to remove completed jobs
remove_on_complete = 31536000
# Time in seconds to remove failed jobs
remove_on_failure = 31536000
# Control the inbox processing queue (for inbound federation)
# Controls the inbox processing queue (for inbound federation)
[queues.inbox]
# Time in seconds to remove completed jobs
remove_on_complete = 31536000
# Time in seconds to remove failed jobs
remove_on_failure = 31536000
# Control the fetch queue (for remote data refreshes)
# Controls the fetch queue (for remote data refreshes)
[queues.fetch]
# Time in seconds to remove completed jobs
remove_on_complete = 31536000
# Time in seconds to remove failed jobs
remove_on_failure = 31536000
# Controls the push queue (for push notification delivery)
[queues.push]
# Time in seconds to remove completed jobs
remove_on_complete = 31536000
# Time in seconds to remove failed jobs
remove_on_failure = 31536000
[federation]
# This is a list of domain names, such as "mastodon.social" or "pleroma.site"
# These changes will not retroactively apply to existing data before they were changed

View file

@ -3126,6 +3126,49 @@
}
}
},
"notifications": {
"type": "object",
"properties": {
"push": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean",
"default": true
},
"vapid": {
"type": "object",
"properties": {
"public": {
"type": "string"
},
"private": {
"type": "string"
},
"subject": {
"type": "string"
}
},
"required": ["public", "private"],
"additionalProperties": false,
"default": {
"public": "",
"private": ""
}
}
},
"additionalProperties": false,
"default": {
"enabled": true,
"vapid": {
"public": "",
"private": ""
}
}
}
},
"additionalProperties": false
},
"defaults": {
"type": "object",
"properties": {
@ -3364,6 +3407,24 @@
"remove_on_complete": 31536000,
"remove_on_failure": 31536000
}
},
"push": {
"type": "object",
"properties": {
"remove_on_complete": {
"type": "integer",
"default": 31536000
},
"remove_on_failure": {
"type": "integer",
"default": 31536000
}
},
"additionalProperties": false,
"default": {
"remove_on_complete": 31536000,
"remove_on_failure": 31536000
}
}
},
"additionalProperties": false,
@ -3379,6 +3440,10 @@
"fetch": {
"remove_on_complete": 31536000,
"remove_on_failure": 31536000
},
"push": {
"remove_on_complete": 31536000,
"remove_on_failure": 31536000
}
}
},
@ -3482,6 +3547,9 @@
"emojis",
"read:emoji",
"owner:emoji",
"read:reaction",
"reactions",
"owner:reaction",
"media",
"owner:media",
"blocks",
@ -3501,6 +3569,7 @@
"owner:follow",
"owner:app",
"search",
"push_notifications",
"public_timelines",
"private_timelines",
"ignore_rate_limits",
@ -3522,6 +3591,8 @@
"owner:boost",
"read:account",
"owner:emoji",
"read:reaction",
"owner:reaction",
"read:emoji",
"owner:media",
"owner:block",
@ -3533,6 +3604,7 @@
"owner:follow",
"owner:app",
"search",
"push_notifications",
"public_timelines",
"private_timelines",
"oauth"
@ -3559,6 +3631,9 @@
"emojis",
"read:emoji",
"owner:emoji",
"read:reaction",
"reactions",
"owner:reaction",
"media",
"owner:media",
"blocks",
@ -3578,6 +3653,7 @@
"owner:follow",
"owner:app",
"search",
"push_notifications",
"public_timelines",
"private_timelines",
"ignore_rate_limits",
@ -3599,6 +3675,8 @@
"owner:boost",
"read:account",
"owner:emoji",
"read:reaction",
"owner:reaction",
"read:emoji",
"owner:media",
"owner:block",
@ -3610,6 +3688,7 @@
"owner:follow",
"owner:app",
"search",
"push_notifications",
"public_timelines",
"private_timelines",
"oauth"
@ -3636,6 +3715,9 @@
"emojis",
"read:emoji",
"owner:emoji",
"read:reaction",
"reactions",
"owner:reaction",
"media",
"owner:media",
"blocks",
@ -3655,6 +3737,7 @@
"owner:follow",
"owner:app",
"search",
"push_notifications",
"public_timelines",
"private_timelines",
"ignore_rate_limits",
@ -3676,6 +3759,8 @@
"owner:boost",
"read:account",
"owner:emoji",
"read:reaction",
"owner:reaction",
"read:emoji",
"owner:media",
"owner:block",
@ -3687,6 +3772,7 @@
"owner:follow",
"owner:app",
"search",
"push_notifications",
"public_timelines",
"private_timelines",
"oauth",
@ -3695,6 +3781,7 @@
"likes",
"boosts",
"emojis",
"reactions",
"media",
"blocks",
"filters",
@ -3725,6 +3812,8 @@
"owner:boost",
"read:account",
"owner:emoji",
"read:reaction",
"owner:reaction",
"read:emoji",
"owner:media",
"owner:block",
@ -3736,6 +3825,7 @@
"owner:follow",
"owner:app",
"search",
"push_notifications",
"public_timelines",
"private_timelines",
"oauth"
@ -3751,6 +3841,8 @@
"owner:boost",
"read:account",
"owner:emoji",
"read:reaction",
"owner:reaction",
"read:emoji",
"owner:media",
"owner:block",
@ -3762,6 +3854,7 @@
"owner:follow",
"owner:app",
"search",
"push_notifications",
"public_timelines",
"private_timelines",
"oauth"
@ -3777,6 +3870,8 @@
"owner:boost",
"read:account",
"owner:emoji",
"read:reaction",
"owner:reaction",
"read:emoji",
"owner:media",
"owner:block",
@ -3788,6 +3883,7 @@
"owner:follow",
"owner:app",
"search",
"push_notifications",
"public_timelines",
"private_timelines",
"oauth",
@ -3796,6 +3892,7 @@
"likes",
"boosts",
"emojis",
"reactions",
"media",
"blocks",
"filters",
@ -4066,6 +4163,7 @@
"signups",
"http",
"smtp",
"notifications",
"filters",
"ratelimits"
],