We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fd96972 commit e1724b2Copy full SHA for e1724b2
src/services/redis.ts
@@ -291,7 +291,7 @@ export const setConfig = async (phone: string, value: any) => {
291
const currentWebhooks: Webhook[] = currentConfig && currentConfig.webhooks || []
292
const newWebhooks: Webhook[] = value && value.webhooks || []
293
const updatedWebooks: Webhook[] = []
294
- const baseWebhook = value.overrideWebhooks ? newWebhooks : currentWebhooks
+ const baseWebhook = value.overrideWebhooks || currentWebhooks.length == 0 ? newWebhooks : currentWebhooks
295
const searchWebhooks = value.overrideWebhooks ? currentWebhooks : newWebhooks
296
baseWebhook.forEach(n => {
297
const c = searchWebhooks.find((c) => c.id === n.id)
0 commit comments