Skip to content

Commit a568243

Browse files
committed
add chatId prop to message-updates
1 parent d4900ad commit a568243

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

components/telegram_bot_api/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/telegram_bot_api",
3-
"version": "0.3.11",
3+
"version": "0.3.12",
44
"description": "Pipedream Telegram_bot_api Components",
55
"main": "telegram_bot_api.app.mjs",
66
"keywords": [
@@ -10,7 +10,7 @@
1010
"homepage": "https://pipedream.com/apps/telegram_bot_api",
1111
"author": "Pipedream <[email protected]> (https://pipedream.com/)",
1212
"dependencies": {
13-
"@pipedream/platform": "^0.9.0",
13+
"@pipedream/platform": "^3.0.3",
1414
"node-telegram-bot-api": "^0.54.0",
1515
"uuid": "^8.3.2"
1616
},

components/telegram_bot_api/sources/message-updates/message-updates.mjs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,19 @@ export default {
66
key: "telegram_bot_api-message-updates",
77
name: "New Message Updates (Instant)",
88
description: "Emit new event each time a Telegram message is created or updated.",
9-
version: "0.1.5",
9+
version: "0.1.6",
1010
type: "source",
1111
dedupe: "unique",
12+
props: {
13+
...base.props,
14+
chatId: {
15+
propDefinition: [
16+
base.props.telegramBotApi,
17+
"chatId",
18+
],
19+
optional: true,
20+
},
21+
},
1222
methods: {
1323
...base.methods,
1424
getMeta(event, message) {
@@ -26,6 +36,9 @@ export default {
2636
},
2737
processEvent(event) {
2838
const message = event.edited_message ?? event.message;
39+
if (this.chatId && this.chatId != message?.chat?.id) {
40+
return;
41+
}
2942
this.$emit(event, this.getMeta(event, message));
3043
},
3144
},

0 commit comments

Comments
 (0)