@patricktobias86/node-red-telegram-account 1.1.1 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/nodes/auth.html +47 -60
- package/nodes/auth.js +36 -24
- package/nodes/command.html +3 -4
- package/nodes/config.html +1 -1
- package/nodes/config.js +32 -36
- package/nodes/delete-message.html +1 -2
- package/nodes/get-entity.html +1 -2
- package/nodes/icons/tg.png +0 -0
- package/nodes/iter-dialogs.html +3 -2
- package/nodes/iter-messages.html +3 -2
- package/nodes/promote-admin.html +1 -2
- package/nodes/receiver.html +1 -2
- package/nodes/send-file.html +3 -3
- package/nodes/send-message.html +1 -2
- package/package.json +1 -1
- package/icons/tg.png +0 -0
package/nodes/auth.html
CHANGED
|
@@ -3,26 +3,24 @@
|
|
|
3
3
|
category: 'telegram-account',
|
|
4
4
|
color: '#a6bbcf',
|
|
5
5
|
defaults: {
|
|
6
|
-
api_id: { value: ""
|
|
7
|
-
api_hash: { value: ""
|
|
8
|
-
phoneNumber: { value: ""
|
|
9
|
-
password: { value: "" }
|
|
6
|
+
api_id: { value: "" },
|
|
7
|
+
api_hash: { value: "" },
|
|
8
|
+
phoneNumber: { value: "" },
|
|
9
|
+
password: { value: "" }
|
|
10
10
|
},
|
|
11
11
|
inputs: 1,
|
|
12
12
|
outputs: 1,
|
|
13
|
-
icon:
|
|
14
|
-
|
|
15
|
-
return this.name || "Telegram Auth";
|
|
16
|
-
},
|
|
13
|
+
icon: 'tg.png',
|
|
14
|
+
paletteLabel: 'user auth',
|
|
17
15
|
oneditprepare: function () {
|
|
18
|
-
//
|
|
16
|
+
// Initialize values
|
|
19
17
|
$("#node-input-api_id").val(this.api_id || "");
|
|
20
18
|
$("#node-input-api_hash").val(this.api_hash || "");
|
|
21
19
|
$("#node-input-phoneNumber").val(this.phoneNumber || "");
|
|
22
20
|
$("#node-input-password").val(this.password || "");
|
|
23
21
|
},
|
|
24
22
|
oneditsave: function () {
|
|
25
|
-
//
|
|
23
|
+
// Save values
|
|
26
24
|
this.api_id = $("#node-input-api_id").val();
|
|
27
25
|
this.api_hash = $("#node-input-api_hash").val();
|
|
28
26
|
this.phoneNumber = $("#node-input-phoneNumber").val();
|
|
@@ -61,78 +59,67 @@
|
|
|
61
59
|
</div>
|
|
62
60
|
|
|
63
61
|
<p>
|
|
64
|
-
<strong>Note:</strong>
|
|
62
|
+
<strong>Note:</strong> These values are used to create a Telegram session string.
|
|
65
63
|
</p>
|
|
66
64
|
</script>
|
|
67
65
|
|
|
68
|
-
|
|
69
66
|
<script type="text/html" data-help-name="auth">
|
|
70
|
-
<p>The <b>auth</b> node facilitates Telegram API authentication using the <code>telegram</code> library. It allows users to authenticate a session and retrieve a stringSession for
|
|
67
|
+
<p>The <b>auth</b> node facilitates Telegram API authentication using the <code>telegram</code> (GramJS) library. It allows users to authenticate a session and retrieve a <code>stringSession</code> for reuse with other Telegram clients.</p>
|
|
71
68
|
|
|
72
69
|
<h3>Inputs</h3>
|
|
73
70
|
<dl class="message-properties">
|
|
74
|
-
<dt>payload.api_id
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
<
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
<
|
|
85
|
-
<span class="property-type">string</span>
|
|
86
|
-
</dt>
|
|
87
|
-
<dd>The phone number associated with the Telegram account.</dd>
|
|
88
|
-
|
|
89
|
-
<dt>payload.password
|
|
90
|
-
<span class="property-type">string</span>
|
|
91
|
-
</dt>
|
|
92
|
-
<dd>The password for two-factor authentication (if enabled on the Telegram account).</dd>
|
|
71
|
+
<dt>payload.api_id <span class="property-type">number | string</span></dt>
|
|
72
|
+
<dd>The Telegram API ID.</dd>
|
|
73
|
+
|
|
74
|
+
<dt>payload.api_hash <span class="property-type">string</span></dt>
|
|
75
|
+
<dd>The Telegram API hash.</dd>
|
|
76
|
+
|
|
77
|
+
<dt>payload.phoneNumber <span class="property-type">string</span></dt>
|
|
78
|
+
<dd>The phone number of the Telegram account, including country code (e.g. +1701234567).</dd>
|
|
79
|
+
|
|
80
|
+
<dt>payload.password <span class="property-type">string</span></dt>
|
|
81
|
+
<dd>(Optional) The password for two-factor authentication.</dd>
|
|
93
82
|
</dl>
|
|
94
83
|
|
|
84
|
+
<h3>Behavior</h3>
|
|
85
|
+
<p>When triggered, the node starts the login flow by sending a code via SMS or Telegram to the specified phone number. The node will wait for a verification code to be supplied separately.</p>
|
|
86
|
+
<p>To complete authentication, you must send the code using a function node like this:</p>
|
|
87
|
+
<pre>
|
|
88
|
+
const code = msg.payload.code;
|
|
89
|
+
const wait = flow.get("waitForCode");
|
|
90
|
+
if (typeof wait === "function") {
|
|
91
|
+
wait(code);
|
|
92
|
+
flow.set("waitForCode", null);
|
|
93
|
+
}
|
|
94
|
+
</pre>
|
|
95
|
+
|
|
95
96
|
<h3>Outputs</h3>
|
|
96
97
|
<dl class="message-properties">
|
|
97
|
-
<dt>topic
|
|
98
|
-
<span class="property-type">string</span>
|
|
99
|
-
</dt>
|
|
98
|
+
<dt>topic <span class="property-type">string</span></dt>
|
|
100
99
|
<dd>
|
|
101
|
-
- <b>"auth_success"</b>:
|
|
102
|
-
- <b>"auth_error"</b>:
|
|
100
|
+
- <b>"auth_success"</b>: Login succeeded.<br>
|
|
101
|
+
- <b>"auth_error"</b>: Login failed.
|
|
103
102
|
</dd>
|
|
104
103
|
|
|
105
|
-
<dt>payload
|
|
106
|
-
<span class="property-type">object</span>
|
|
107
|
-
</dt>
|
|
104
|
+
<dt>payload <span class="property-type">object</span></dt>
|
|
108
105
|
<dd>
|
|
109
|
-
For <b>"auth_success"</b>:
|
|
110
|
-
<ul>
|
|
111
|
-
<li><code>payload.stringSession</code>: The generated session string.</li>
|
|
112
|
-
<li><code>payload.message</code>: Success message.</li>
|
|
113
|
-
</ul>
|
|
114
|
-
For <b>"auth_error"</b>:
|
|
115
106
|
<ul>
|
|
116
|
-
<li><code>
|
|
107
|
+
<li><code>stringSession</code>: The generated session string to reuse in your bots.</li>
|
|
108
|
+
<li><code>message</code> or <code>error</code>: Additional info.</li>
|
|
117
109
|
</ul>
|
|
118
110
|
</dd>
|
|
119
111
|
</dl>
|
|
120
112
|
|
|
121
|
-
<h3>Details</h3>
|
|
122
|
-
<p>To use the <b>auth</b> node, pass the required API credentials and phone number as part of the input message payload. The node will initiate the Telegram authentication flow. If a two-factor password is required, include it in the <code>payload.password</code>.</p>
|
|
123
|
-
|
|
124
|
-
<p>The node temporarily stores the phone code resolver in the flow context under the key <code>phoneCode</code>. This allows subsequent nodes to resolve the phone code using a separate input mechanism, such as user interaction.</p>
|
|
125
|
-
|
|
126
113
|
<h3>Example</h3>
|
|
127
114
|
<pre>
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
}
|
|
115
|
+
{
|
|
116
|
+
"payload": {
|
|
117
|
+
"api_id": "123456",
|
|
118
|
+
"api_hash": "your_api_hash",
|
|
119
|
+
"phoneNumber": "+46701234567",
|
|
120
|
+
"password": "optional_password"
|
|
135
121
|
}
|
|
122
|
+
}
|
|
136
123
|
</pre>
|
|
137
|
-
<p>
|
|
124
|
+
<p>Use a separate node to submit the received code after triggering this payload.</p>
|
|
138
125
|
</script>
|
package/nodes/auth.js
CHANGED
|
@@ -7,51 +7,63 @@ module.exports = function (RED) {
|
|
|
7
7
|
const node = this;
|
|
8
8
|
|
|
9
9
|
this.on("input", async (msg) => {
|
|
10
|
-
const api_idString = msg.payload.api_id || config.api_id;
|
|
11
|
-
const api_hash = msg.payload.api_hash || config.api_hash;
|
|
12
|
-
const phoneNumber = msg.payload.phoneNumber || config.phoneNumber;
|
|
13
|
-
const password = msg.payload.password || config.password;
|
|
14
|
-
const api_id = parseInt(api_idString);
|
|
15
10
|
|
|
16
|
-
const
|
|
11
|
+
const payload = (msg && typeof msg.payload === "object") ? msg.payload : {};
|
|
12
|
+
|
|
13
|
+
const api_id = parseInt(payload.api_id || config.api_id);
|
|
14
|
+
const api_hash = payload.api_hash || config.api_hash;
|
|
15
|
+
const phoneNumber = payload.phoneNumber || config.phoneNumber;
|
|
16
|
+
const password = payload.password || config.password;
|
|
17
|
+
|
|
18
|
+
if (!api_id || !api_hash || !phoneNumber) {
|
|
19
|
+
node.error("Missing required API credentials (api_id, api_hash, or phoneNumber).");
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const session = new StringSession(""); // always generate a new session
|
|
17
24
|
const client = new TelegramClient(session, api_id, api_hash, {
|
|
18
25
|
connectionRetries: 5,
|
|
19
26
|
});
|
|
20
27
|
|
|
21
|
-
|
|
22
|
-
let resolvePhoneCode;
|
|
23
28
|
const context = node.context().flow;
|
|
24
29
|
|
|
30
|
+
let phoneCodePromise = new Promise((resolve) => {
|
|
31
|
+
context.set("waitForCode", resolve);
|
|
32
|
+
});
|
|
33
|
+
|
|
25
34
|
try {
|
|
26
35
|
await client.start({
|
|
27
36
|
phoneNumber: () => phoneNumber,
|
|
28
37
|
password: () => password,
|
|
29
|
-
phoneCode: async () =>{
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
})
|
|
38
|
+
phoneCode: async () => {
|
|
39
|
+
node.status({ fill: "yellow", shape: "ring", text: "Waiting for code" });
|
|
40
|
+
const code = await phoneCodePromise;
|
|
41
|
+
return code;
|
|
34
42
|
},
|
|
35
|
-
onError: (err) => node.error(
|
|
43
|
+
onError: (err) => node.error("GramJS Error: " + err.message),
|
|
36
44
|
});
|
|
37
45
|
|
|
38
|
-
const stringSession = client.session.save();
|
|
46
|
+
const stringSession = client.session.save();
|
|
39
47
|
node.send({
|
|
40
|
-
topic: "
|
|
48
|
+
topic: "auth_complete",
|
|
41
49
|
payload: {
|
|
42
50
|
stringSession,
|
|
43
|
-
|
|
44
|
-
|
|
51
|
+
messages: [
|
|
52
|
+
{ type: "auth_success", text: "Authorization successful!" },
|
|
53
|
+
{ type: "session_token", text: "Copy this stringSession to use in other nodes." }
|
|
54
|
+
]
|
|
55
|
+
}
|
|
45
56
|
});
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
57
|
+
|
|
58
|
+
node.status({ fill: "green", shape: "dot", text: "Authenticated" });
|
|
59
|
+
|
|
60
|
+
} catch (err) {
|
|
61
|
+
node.error("Authentication failed: " + err.message);
|
|
49
62
|
node.send({
|
|
50
63
|
topic: "auth_error",
|
|
51
|
-
payload: {
|
|
52
|
-
error: error.message,
|
|
53
|
-
},
|
|
64
|
+
payload: { error: err.message },
|
|
54
65
|
});
|
|
66
|
+
node.status({ fill: "red", shape: "ring", text: "Failed" });
|
|
55
67
|
}
|
|
56
68
|
});
|
|
57
69
|
}
|
package/nodes/command.html
CHANGED
|
@@ -3,17 +3,16 @@
|
|
|
3
3
|
category: 'telegram-account',
|
|
4
4
|
color: '#229ED9',
|
|
5
5
|
icon: 'tg.png',
|
|
6
|
-
align:"right",
|
|
7
6
|
defaults: {
|
|
8
7
|
name: { value: '' },
|
|
9
8
|
config: { type: 'config', required: false },
|
|
10
|
-
command: { value: "", required:true },
|
|
11
|
-
regex:{ value:false }
|
|
9
|
+
command: { value: "", required: true },
|
|
10
|
+
regex: { value: false }
|
|
12
11
|
},
|
|
13
12
|
inputs: 1,
|
|
14
13
|
outputs: 1,
|
|
15
14
|
label: function () {
|
|
16
|
-
return this.name || '
|
|
15
|
+
return this.name || 'command';
|
|
17
16
|
},
|
|
18
17
|
|
|
19
18
|
});
|
package/nodes/config.html
CHANGED
package/nodes/config.js
CHANGED
|
@@ -1,58 +1,54 @@
|
|
|
1
1
|
const { TelegramClient } = require("telegram");
|
|
2
2
|
const { StringSession } = require("telegram/sessions");
|
|
3
3
|
|
|
4
|
+
const activeClients = {}; // Cache: session string → connected client
|
|
5
|
+
|
|
4
6
|
module.exports = function (RED) {
|
|
5
7
|
function TelegramClientConfig(config) {
|
|
6
8
|
RED.nodes.createNode(this, config);
|
|
7
|
-
this.apiId = config.api_id;
|
|
8
|
-
this.apiHash = config.api_hash;
|
|
9
|
-
this.session = new StringSession(config.session);
|
|
10
|
-
this.useIPV6 = config.useIPV6;
|
|
11
|
-
this.timeout = config.timeout;
|
|
12
|
-
this.requestRetries = config.requestRetries;
|
|
13
|
-
this.connectionRetries = config.connectionRetries;
|
|
14
|
-
this.proxy = config.proxy;
|
|
15
|
-
this.downloadRetries = config.downloadRetries;
|
|
16
|
-
this.retryDelay = config.retryDelay;
|
|
17
|
-
this.autoReconnect = config.autoReconnect;
|
|
18
|
-
this.sequentialUpdates = config.sequentialUpdates;
|
|
19
|
-
this.floodSleepThreshold = config.floodSleepThreshold;
|
|
20
|
-
this.deviceModel = config.deviceModel;
|
|
21
|
-
this.systemVersion = config.systemVersion;
|
|
22
|
-
this.appVersion = config.appVersion;
|
|
23
|
-
this.langCode = config.langCode;
|
|
24
|
-
this.systemLangCode = config.systemLangCode;
|
|
25
|
-
this.useWSS = config.useWSS;
|
|
26
|
-
this.maxConcurrentDownloads = config.maxConcurrentDownloads;
|
|
27
|
-
this.securityChecks = config.securityChecks;
|
|
28
|
-
this.testServers = config.testServers;
|
|
29
|
-
const node = this;
|
|
30
9
|
|
|
10
|
+
const sessionStr = config.session;
|
|
11
|
+
const apiId = parseInt(config.api_id);
|
|
12
|
+
const apiHash = config.api_hash;
|
|
31
13
|
|
|
32
|
-
this.
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
14
|
+
this.session = new StringSession(sessionStr);
|
|
15
|
+
this.client = null;
|
|
16
|
+
|
|
17
|
+
const node = this;
|
|
18
|
+
|
|
19
|
+
if (activeClients[sessionStr]) {
|
|
20
|
+
// Reuse existing client
|
|
21
|
+
this.client = activeClients[sessionStr];
|
|
22
|
+
node.status({ fill: "green", shape: "dot", text: "Reused existing client" });
|
|
23
|
+
} else {
|
|
24
|
+
// Create and connect new client
|
|
25
|
+
this.client = new TelegramClient(this.session, apiId, apiHash, {
|
|
26
|
+
connectionRetries: config.connectionRetries || 5,
|
|
27
|
+
autoReconnect: config.autoReconnect !== false,
|
|
28
|
+
requestRetries: config.requestRetries || 5,
|
|
29
|
+
});
|
|
36
30
|
|
|
37
|
-
try {
|
|
38
31
|
this.client.connect().then(async () => {
|
|
39
|
-
|
|
40
|
-
if (!
|
|
41
|
-
node.error(
|
|
32
|
+
const authorized = await this.client.isUserAuthorized();
|
|
33
|
+
if (!authorized) {
|
|
34
|
+
node.error("Session is invalid");
|
|
42
35
|
} else {
|
|
43
36
|
node.status({ fill: "green", shape: "dot", text: "Connected" });
|
|
37
|
+
activeClients[sessionStr] = this.client;
|
|
44
38
|
}
|
|
39
|
+
}).catch(err => {
|
|
40
|
+
node.error("Connection error: " + err.message);
|
|
45
41
|
});
|
|
46
|
-
} catch (err) {
|
|
47
|
-
node.error('Authorisation error: ' + err.message);
|
|
48
42
|
}
|
|
49
43
|
|
|
50
|
-
this.on("close", () => {
|
|
51
|
-
if (this.client) {
|
|
52
|
-
this.client.disconnect();
|
|
44
|
+
this.on("close", async () => {
|
|
45
|
+
if (this.client && activeClients[sessionStr] === this.client) {
|
|
46
|
+
await this.client.disconnect();
|
|
47
|
+
delete activeClients[sessionStr];
|
|
53
48
|
node.status({ fill: "red", shape: "ring", text: "Disconnected" });
|
|
54
49
|
}
|
|
55
50
|
});
|
|
56
51
|
}
|
|
52
|
+
|
|
57
53
|
RED.nodes.registerType('config', TelegramClientConfig);
|
|
58
54
|
};
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
category: 'telegram-account',
|
|
4
4
|
color: '#FF5733',
|
|
5
5
|
icon: 'tg.png',
|
|
6
|
-
align: 'right',
|
|
7
6
|
defaults: {
|
|
8
7
|
name: { value: '' },
|
|
9
8
|
config: { type: 'config', required: false },
|
|
@@ -11,7 +10,7 @@
|
|
|
11
10
|
inputs: 1,
|
|
12
11
|
outputs: 1,
|
|
13
12
|
label: function () {
|
|
14
|
-
return this.name || '
|
|
13
|
+
return this.name || 'delete message';
|
|
15
14
|
},
|
|
16
15
|
});
|
|
17
16
|
</script>
|
package/nodes/get-entity.html
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
category: 'telegram-account',
|
|
4
4
|
color: '#229ED9',
|
|
5
5
|
icon: 'tg.png',
|
|
6
|
-
align: "right",
|
|
7
6
|
defaults: {
|
|
8
7
|
name: { value: '' },
|
|
9
8
|
config: { type: 'config', required: false },
|
|
@@ -11,7 +10,7 @@
|
|
|
11
10
|
inputs: 1,
|
|
12
11
|
outputs: 1,
|
|
13
12
|
label: function () {
|
|
14
|
-
return this.name || '
|
|
13
|
+
return this.name || 'get entity';
|
|
15
14
|
}
|
|
16
15
|
});
|
|
17
16
|
</script>
|
|
Binary file
|
package/nodes/iter-dialogs.html
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
RED.nodes.registerType('iter-dialogs', {
|
|
3
3
|
category: 'telegram-account',
|
|
4
4
|
color: '#32a3e0',
|
|
5
|
+
icon: 'tg.png',
|
|
5
6
|
defaults: {
|
|
6
7
|
name: { value: '' },
|
|
7
8
|
config: { type: 'config', required: true },
|
|
@@ -15,9 +16,9 @@
|
|
|
15
16
|
},
|
|
16
17
|
inputs: 1,
|
|
17
18
|
outputs: 1,
|
|
18
|
-
paletteLabel: '
|
|
19
|
+
paletteLabel: 'iterate dialogs',
|
|
19
20
|
label: function () {
|
|
20
|
-
return this.name || '
|
|
21
|
+
return this.name || 'iterate dialogs';
|
|
21
22
|
},
|
|
22
23
|
});
|
|
23
24
|
</script>
|
package/nodes/iter-messages.html
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
RED.nodes.registerType('iter-messages', {
|
|
3
3
|
category: 'telegram',
|
|
4
4
|
color: '#32a3e0',
|
|
5
|
+
icon: 'tg.png',
|
|
5
6
|
defaults: {
|
|
6
7
|
name: { value: '' },
|
|
7
8
|
config: { type: 'config', required: true },
|
|
@@ -23,9 +24,9 @@
|
|
|
23
24
|
},
|
|
24
25
|
inputs: 1,
|
|
25
26
|
outputs: 1,
|
|
26
|
-
paletteLabel: '
|
|
27
|
+
paletteLabel: 'iterate messages',
|
|
27
28
|
label: function () {
|
|
28
|
-
return this.name || '
|
|
29
|
+
return this.name || 'iterate messages';
|
|
29
30
|
},
|
|
30
31
|
oneditprepare: function(){
|
|
31
32
|
const node = this;
|
package/nodes/promote-admin.html
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
category: 'telegram-account',
|
|
4
4
|
color: '#229ED9',
|
|
5
5
|
icon: 'tg.png',
|
|
6
|
-
align: "right",
|
|
7
6
|
defaults: {
|
|
8
7
|
name: { value: '' },
|
|
9
8
|
config: { type: 'config', required: false },
|
|
@@ -25,7 +24,7 @@
|
|
|
25
24
|
inputs: 1,
|
|
26
25
|
outputs: 1,
|
|
27
26
|
label: function () {
|
|
28
|
-
return this.name || '
|
|
27
|
+
return this.name || 'promote admin';
|
|
29
28
|
},
|
|
30
29
|
oneditprepare: function () {
|
|
31
30
|
// No extra logic needed
|
package/nodes/receiver.html
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
category: 'telegram-account',
|
|
4
4
|
color: '#229ED9',
|
|
5
5
|
icon: 'tg.png',
|
|
6
|
-
align:"right",
|
|
7
6
|
defaults: {
|
|
8
7
|
name: { value: '' },
|
|
9
8
|
config: { type: 'config', required: false },
|
|
@@ -12,7 +11,7 @@
|
|
|
12
11
|
inputs: 1,
|
|
13
12
|
outputs: 1,
|
|
14
13
|
label: function () {
|
|
15
|
-
return this.name || '
|
|
14
|
+
return this.name || 'receiver';
|
|
16
15
|
},
|
|
17
16
|
|
|
18
17
|
});
|
package/nodes/send-file.html
CHANGED
|
@@ -30,10 +30,10 @@
|
|
|
30
30
|
},
|
|
31
31
|
inputs: 1,
|
|
32
32
|
outputs: 1,
|
|
33
|
-
icon: '
|
|
34
|
-
paletteLabel: '
|
|
33
|
+
icon: 'tg.png',
|
|
34
|
+
paletteLabel: 'send files',
|
|
35
35
|
label: function () {
|
|
36
|
-
return this.name || '
|
|
36
|
+
return this.name || 'send files';
|
|
37
37
|
},
|
|
38
38
|
});
|
|
39
39
|
</script>
|
package/nodes/send-message.html
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
category: 'telegram-account',
|
|
4
4
|
color: '#229ED9',
|
|
5
5
|
icon: 'tg.png',
|
|
6
|
-
align: "right",
|
|
7
6
|
defaults: {
|
|
8
7
|
name: { value: '' },
|
|
9
8
|
chatId: { value: '' },
|
|
@@ -29,7 +28,7 @@
|
|
|
29
28
|
inputs: 1,
|
|
30
29
|
outputs: 1,
|
|
31
30
|
label: function () {
|
|
32
|
-
return this.name || '
|
|
31
|
+
return this.name || 'send message';
|
|
33
32
|
},
|
|
34
33
|
oneditprepare: function () {
|
|
35
34
|
const node = this;
|
package/package.json
CHANGED
package/icons/tg.png
DELETED
|
Binary file
|