mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
feat(Telegram Node): Allow querying chat administrators (#3226)
* ✨ Add Get Telegram Chat Administrators * feat(Microsoft Dynamics CRM Node): Add support for other regions than North America (#3157) * Typo * Added all dynamics regions * Change uri to match credentials region * ⚡ Small improvement Co-authored-by: ricardo <ricardoespinoza105@gmail.com> * ⚡ Return data in correct format Co-authored-by: agobrech <45268029+agobrech@users.noreply.github.com> Co-authored-by: ricardo <ricardoespinoza105@gmail.com> Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
This commit is contained in:
@@ -120,16 +120,21 @@ export class Telegram implements INodeType {
|
||||
value: 'get',
|
||||
description: 'Get up to date information about a chat.',
|
||||
},
|
||||
{
|
||||
name: 'Get Administrators',
|
||||
value: 'administrators',
|
||||
description: 'Get the Administrators of a chat.',
|
||||
},
|
||||
{
|
||||
name: 'Get Member',
|
||||
value: 'member',
|
||||
description: 'Get the member of a chat.',
|
||||
},
|
||||
{
|
||||
name: 'Leave',
|
||||
value: 'leave',
|
||||
description: 'Leave a group, supergroup or channel.',
|
||||
},
|
||||
{
|
||||
name: 'Member',
|
||||
value: 'member',
|
||||
description: 'Get the member of a chat.',
|
||||
},
|
||||
{
|
||||
name: 'Set Description',
|
||||
value: 'setDescription',
|
||||
@@ -293,6 +298,7 @@ export class Telegram implements INodeType {
|
||||
displayOptions: {
|
||||
show: {
|
||||
operation: [
|
||||
'administrators',
|
||||
'deleteMessage',
|
||||
'get',
|
||||
'leave',
|
||||
@@ -1909,6 +1915,15 @@ export class Telegram implements INodeType {
|
||||
|
||||
body.chat_id = this.getNodeParameter('chatId', i) as string;
|
||||
|
||||
} else if (operation === 'administrators') {
|
||||
// ----------------------------------
|
||||
// chat:administrators
|
||||
// ----------------------------------
|
||||
|
||||
endpoint = 'getChatAdministrators';
|
||||
|
||||
body.chat_id = this.getNodeParameter('chatId', i) as string;
|
||||
|
||||
} else if (operation === 'leave') {
|
||||
// ----------------------------------
|
||||
// chat:leave
|
||||
@@ -2207,6 +2222,9 @@ export class Telegram implements INodeType {
|
||||
});
|
||||
continue;
|
||||
}
|
||||
} else if (resource === 'chat' && operation === 'administrators') {
|
||||
returnData.push(...this.helpers.returnJsonArray(responseData.result));
|
||||
continue;
|
||||
}
|
||||
|
||||
// if (resource === 'bot' && operation === 'info') {
|
||||
|
||||
Reference in New Issue
Block a user