Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: allow admins to modify notification template delivery method#14116

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

dannykopping
Copy link
Contributor

@dannykoppingdannykopping commentedAug 2, 2024
edited
Loading

Part ofcoder/internal#19

Admins must be able to modify which delivery method is set for each notification template. For all templates with a method not set, it falls back to the deployment-wide setting.

This PR enables the above functionality, and modifies the notification dispatch process to take custom dispatch methods per template into account.

Added two new routes:

  • PUT /notifications/templates/{notification_template}/method
    • Enterprise only, allows admins to modify the delivery method on each notification template
    • Enables use-cases like "send all notifications via email, but send theuser account created notification via webhook so I can programmatically update my billing registry"
  • GET /notifications/templates/system
    • AGPL, retrieves all notification templates of kindsystem
    • this is the only kind right now; in the future we'll have user-defined notification templates

Also made some small drive-by changes to thenotification settings work recently implemented.

@dannykoppingGraphite App
Copy link
ContributorAuthor

dannykopping commentedAug 2, 2024
edited
Loading

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stackon Graphite.
Learn more

This stack of pull requests is managed by Graphite.Learn more about stacking.

Join@dannykopping and the rest of your teammates onGraphiteGraphite

@dannykoppingdannykopping changed the titleUpdate template method APIfeat: allow admins to modify notification template delivery methodAug 2, 2024
@dannykoppingdannykopping added the enterpriseEnterprise-license / premium functionality labelAug 2, 2024 — withGraphite App
@alwaysmeticulousalwaysmeticulous
Copy link

alwaysmeticulousbot commentedAug 2, 2024
edited
Loading

Meticulous was unable to execute a test run for this PR because the most recent commit is associated with multiple PRs. To execute a test run, please try pushing up a new commit that is only associated with this PR.

Last updated for commit33e9bc9. This comment will update as new commits are pushed.

@dannykoppingdannykoppingforce-pushed thedk/notification-prefs/admin-template-method branch froma38ce71 tob7c9ca8CompareAugust 2, 2024 14:24
@dannykoppingdannykoppingforce-pushed thedk/notification-prefs/db-audit branch from2105aa4 toc4b8b31CompareAugust 2, 2024 14:39
@dannykoppingdannykoppingforce-pushed thedk/notification-prefs/admin-template-method branch from4a0e0f2 to8041cc7CompareAugust 2, 2024 14:40
@dannykoppingdannykoppingforce-pushed thedk/notification-prefs/db-audit branch 2 times, most recently from6ea0336 to2cc690cCompareAugust 5, 2024 08:00
@dannykoppingdannykoppingforce-pushed thedk/notification-prefs/admin-template-method branch 4 times, most recently from0386dab to8bec5b1CompareAugust 5, 2024 09:35
Comment on lines +56 to +58
dispatchMethod := s.defaultMethod
if metadata.CustomMethod.Valid {
dispatchMethod = metadata.CustomMethod.NotificationMethod
Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Here is where the new dispatch method is chosen

@dannykoppingdannykopping marked this pull request as ready for reviewAugust 5, 2024 09:53
@dannykoppingdannykoppingforce-pushed thedk/notification-prefs/admin-template-method branch 2 times, most recently fromf2926a3 tob3679feCompareAugust 5, 2024 11:51
Signed-off-by: Danny Kopping <danny@coder.com>
Signed-off-by: Danny Kopping <danny@coder.com>
Signed-off-by: Danny Kopping <danny@coder.com>
Signed-off-by: Danny Kopping <danny@coder.com>
Signed-off-by: Danny Kopping <danny@coder.com>
Signed-off-by: Danny Kopping <danny@coder.com>
Signed-off-by: Danny Kopping <danny@coder.com>
Signed-off-by: Danny Kopping <danny@coder.com>
Signed-off-by: Danny Kopping <danny@coder.com>
Signed-off-by: Danny Kopping <danny@coder.com>
Signed-off-by: Danny Kopping <danny@coder.com>
Signed-off-by: Danny Kopping <danny@coder.com>
Signed-off-by: Danny Kopping <danny@coder.com>
Signed-off-by: Danny Kopping <danny@coder.com>
Signed-off-by: Danny Kopping <danny@coder.com>
@dannykoppingdannykoppingforce-pushed thedk/notification-prefs/admin-template-method branch fromb3679fe tod627fefCompareAugust 5, 2024 11:54
@dannykoppingdannykoppingforce-pushed thedk/notification-prefs/db-audit branch from2cc690c toc744d33CompareAugust 5, 2024 11:54
@dannykoppingdannykopping merged commite4103c3 intodk/notification-prefs/db-auditAug 5, 2024
31 checks passed
@dannykoppingdannykopping deleted the dk/notification-prefs/admin-template-method branchAugust 5, 2024 13:32
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsAug 5, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@johnstcnjohnstcnjohnstcn approved these changes

@mafredrimafredriAwaiting requested review from mafredri

Assignees

@dannykoppingdannykopping

Labels
enterpriseEnterprise-license / premium functionality
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@dannykopping@johnstcn

[8]ページ先頭

©2009-2025 Movatter.jp