mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
Currently the `targets` column in `inbox_notifications` doesn't get filled. This PR fixes that. Rather than give targets special treatment, we should put it in the payload like everything else. This correctly propagates notification targets to the inbox table without much code change.
29 lines
1019 B
Plaintext
29 lines
1019 B
Plaintext
{
|
|
"_version": "1.1",
|
|
"msg_id": "00000000-0000-0000-0000-000000000000",
|
|
"payload": {
|
|
"_version": "1.2",
|
|
"notification_name": "Workspace Out Of Memory",
|
|
"notification_template_id": "00000000-0000-0000-0000-000000000000",
|
|
"user_id": "00000000-0000-0000-0000-000000000000",
|
|
"user_email": "bobby@coder.com",
|
|
"user_name": "Bobby",
|
|
"user_username": "bobby",
|
|
"actions": [
|
|
{
|
|
"label": "View workspace",
|
|
"url": "http://test.com/@bobby/bobby-workspace"
|
|
}
|
|
],
|
|
"labels": {
|
|
"threshold": "90%",
|
|
"workspace": "bobby-workspace"
|
|
},
|
|
"data": null,
|
|
"targets": null
|
|
},
|
|
"title": "Your workspace \"bobby-workspace\" is low on memory",
|
|
"title_markdown": "Your workspace \"bobby-workspace\" is low on memory",
|
|
"body": "Hi Bobby,\n\nYour workspace bobby-workspace has reached the memory usage threshold set at 90%.",
|
|
"body_markdown": "Hi Bobby,\n\nYour workspace **bobby-workspace** has reached the memory usage threshold set at **90%**."
|
|
} |