mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-25 04:34:06 -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",
|
||||
"version": "0.168.2",
|
||||
"version": "0.174.0",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "n8n",
|
||||
"version": "0.168.2",
|
||||
"version": "0.174.0",
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.14.6",
|
||||
"@fontsource/open-sans": "^4.5.0",
|
||||
|
|
|
@ -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') {
|
||||
|
|
Loading…
Reference in a new issue