mirror of
https://github.com/gnmyt/myspeed.git
synced 2026-04-27 23:43:05 -05:00
Integrated both events into the webhook.js integration
This commit is contained in:
@@ -23,6 +23,14 @@ module.exports = (registerEvent) => {
|
||||
if (integration.data.send_failed) await postWebhook(integration.data.url, "TEST_FAILED", {error}, activity);
|
||||
});
|
||||
|
||||
registerEvent('recommendationsUpdated', async (integration, data, activity) => {
|
||||
if (integration.data.send_recommendations) await postWebhook(integration.data.url, "RECOMMENDATIONS_UPDATED", data, activity);
|
||||
});
|
||||
|
||||
registerEvent('configUpdated', async (integration, data, activity) => {
|
||||
if (integration.data.send_config_updates) await postWebhook(integration.data.url, "CONFIG_UPDATED", data, activity);
|
||||
});
|
||||
|
||||
return {
|
||||
icon: "fa-solid fa-globe",
|
||||
fields: [
|
||||
@@ -30,7 +38,9 @@ module.exports = (registerEvent) => {
|
||||
{name: "send_started", type: "boolean", required: false},
|
||||
{name: "send_finished", type: "boolean", required: false},
|
||||
{name: "send_alive", type: "boolean", required: false},
|
||||
{name: "send_failed", type: "boolean", required: false}
|
||||
{name: "send_failed", type: "boolean", required: false},
|
||||
{name: "send_recommendations", type: "boolean", required: false},
|
||||
{name: "send_config_updates", type: "boolean", required: false}
|
||||
]
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user