mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08: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:
parent
4bdd607fdf
commit
c02d259453
4
package-lock.json
generated
4
package-lock.json
generated
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "n8n",
|
"name": "n8n",
|
||||||
"version": "0.168.2",
|
"version": "0.174.0",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "n8n",
|
"name": "n8n",
|
||||||
"version": "0.168.2",
|
"version": "0.174.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/core": "^7.14.6",
|
"@babel/core": "^7.14.6",
|
||||||
"@fontsource/open-sans": "^4.5.0",
|
"@fontsource/open-sans": "^4.5.0",
|
||||||
|
|
|
@ -120,16 +120,21 @@ export class Telegram implements INodeType {
|
||||||
value: 'get',
|
value: 'get',
|
||||||
description: 'Get up to date information about a chat.',
|
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',
|
name: 'Leave',
|
||||||
value: 'leave',
|
value: 'leave',
|
||||||
description: 'Leave a group, supergroup or channel.',
|
description: 'Leave a group, supergroup or channel.',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: 'Member',
|
|
||||||
value: 'member',
|
|
||||||
description: 'Get the member of a chat.',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: 'Set Description',
|
name: 'Set Description',
|
||||||
value: 'setDescription',
|
value: 'setDescription',
|
||||||
|
@ -293,6 +298,7 @@ export class Telegram implements INodeType {
|
||||||
displayOptions: {
|
displayOptions: {
|
||||||
show: {
|
show: {
|
||||||
operation: [
|
operation: [
|
||||||
|
'administrators',
|
||||||
'deleteMessage',
|
'deleteMessage',
|
||||||
'get',
|
'get',
|
||||||
'leave',
|
'leave',
|
||||||
|
@ -1909,6 +1915,15 @@ export class Telegram implements INodeType {
|
||||||
|
|
||||||
body.chat_id = this.getNodeParameter('chatId', i) as string;
|
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') {
|
} else if (operation === 'leave') {
|
||||||
// ----------------------------------
|
// ----------------------------------
|
||||||
// chat:leave
|
// chat:leave
|
||||||
|
@ -2207,6 +2222,9 @@ export class Telegram implements INodeType {
|
||||||
});
|
});
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
} else if (resource === 'chat' && operation === 'administrators') {
|
||||||
|
returnData.push(...this.helpers.returnJsonArray(responseData.result));
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// if (resource === 'bot' && operation === 'info') {
|
// if (resource === 'bot' && operation === 'info') {
|
||||||
|
|
Loading…
Reference in a new issue