alpha
Login
or
Join now
foxxmd.dev
/
tautulli-notification-digest
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
[READ-ONLY] Mirror of https://github.com/FoxxMD/tautulli-notification-digest. Consolidate Tautuilli Notification agent events for discord
digest
discord
newsletter
notification
plex
tautulli
tautulli-api
webhook
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
Pipelines
Add defaults overwrite behavior
author
FoxxMD
date
2 years ago
(Aug 14, 2023, 2:57 PM -0400)
commit
8464514b
8464514b8fd923321b33986b7ef75bb20225ef0a
parent
3abfb3e6
3abfb3e697e476dcde3c4f20485ab41ac77a5d09
+19
1 changed file
Expand all
Collapse all
Unified
Split
src
common
config
ConfigBuilder.ts
+19
src/common/config/ConfigBuilder.ts
View file
Reviewed
···
110
110
arrayMerge: overwriteMerge,
111
111
}) as OperatorJsonConfig;
112
112
113
113
+
const {
114
114
+
defaults,
115
115
+
} = mergedConfig;
116
116
+
117
117
+
if (defaults !== undefined) {
118
118
+
for (const digest of mergedConfig.digests) {
119
119
+
if (defaults.webhook !== undefined && digest.discord.webhook === undefined || digest.discord.webhook === '') {
120
120
+
digest.discord.webhook = defaults.webhook;
121
121
+
}
122
122
+
if (defaults.dedup !== undefined && digest.dedup === undefined) {
123
123
+
digest.dedup = defaults.dedup;
124
124
+
}
125
125
+
if (defaults.discordOptions !== undefined) {
126
126
+
const existing = digest.discord.options ?? {};
127
127
+
digest.discord.options = {...defaults.discordOptions, ...existing};
128
128
+
}
129
129
+
}
130
130
+
}
131
131
+
113
132
return mergedConfig as OperatorConfig;
114
133
}
115
134