mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
⚡ Fixed checkExists logic to ensure API registered webhook URL matches local
This commit is contained in:
@@ -114,14 +114,13 @@ export class TelegramTrigger implements INodeType {
|
||||
async checkExists(this: IHookFunctions): Promise<boolean> {
|
||||
const endpoint = 'getWebhookInfo';
|
||||
const webhookReturnData = await apiRequest.call(this, 'POST', endpoint, {});
|
||||
const webhookUrl = this.getNodeWebhookUrl('default');
|
||||
|
||||
//https://core.telegram.org/bots/api#webhookinfo
|
||||
// IF Webhook URL is empty if not setup
|
||||
if (webhookReturnData.result.url === '') {
|
||||
return false;
|
||||
if (webhookReturnData.result.url === webhookUrl) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return true;
|
||||
return false;
|
||||
},
|
||||
async create(this: IHookFunctions): Promise<boolean> {
|
||||
const webhookUrl = this.getNodeWebhookUrl('default');
|
||||
|
||||
Reference in New Issue
Block a user