Skip to content

Commit 6cb8849

Browse files
committed
updating webhooks
1 parent 57625fb commit 6cb8849

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

plugins/smartling/src/plugin.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -213,12 +213,12 @@ const initializeSmartlingPlugin = async () => {
213213
pkg.name
214214
);
215215

216-
// Check if webhook URL needs updating
216+
// Check if webhook URL needs updating - update whenever the URL is different
217217
const currentWebhookUrl = existingModel.webhooks?.[0]?.url;
218218
const newWebhookUrl = updatedTemplate.webhooks[0].url;
219219

220-
if (currentWebhookUrl && !currentWebhookUrl.includes('preferredVersion=v2') && newWebhookUrl.includes('preferredVersion=v2')) {
221-
// Update the existing model with v2 webhook
220+
if (currentWebhookUrl !== newWebhookUrl) {
221+
// Update the existing model with new webhook configuration
222222
existingModel.webhooks = updatedTemplate.webhooks;
223223
}
224224
}

0 commit comments

Comments
 (0)