+If you like this plugin and are considering donating to support continued development, use the buttons below!
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/Authorized User Features.md b/docs/Authorized User Features.md
new file mode 100644
index 0000000..e9a5796
--- /dev/null
+++ b/docs/Authorized User Features.md
@@ -0,0 +1,8 @@
+#### Authorized User Features
+
+โ
voice and video notes transcription using template variable {{voiceTranscript}} (only for Telegram Premium subscribers)
+โ reacting with "๐" instead of replying for marking messages as processed (not implemented)
+โ getting messages older then 24 hours if obsidian wasn't running (not implemented)
+โ deleting messages older then 48 hours (not implemented)
+โ delete messages that were forwarded to the same place where they were and marking original messages as processed (not implemented)
+โ automatically identifying renamed topic without using command /topicName (not implemented)
\ No newline at end of file
diff --git a/docs/Message Objects Examples.md b/docs/Message Objects Examples.md
new file mode 100644
index 0000000..d1c0298
--- /dev/null
+++ b/docs/Message Objects Examples.md
@@ -0,0 +1,137 @@
+###### example 1
+```json
+{
+ "message_id": 802,
+ "from": {
+ "id": 1110636370,
+ "is_bot": false,
+ "first_name": "soberHacker",
+ "username": "soberhacker",
+ "language_code": "en"
+ },
+ "chat": {
+ "id": 1110636370,
+ "first_name": "soberHacker",
+ "username": "soberhacker",
+ "type": "private"
+ },
+ "date": 1686431489,
+ "reply_to_message": {
+ "message_id": 676,
+ "from": {
+ "id": 1110636370,
+ "is_bot": false,
+ "first_name": "soberHacker",
+ "username": "soberhacker",
+ "language_code": "en"
+ },
+ "chat": {
+ "id": 1110636370,
+ "first_name": "soberHacker",
+ "username": "soberhacker",
+ "type": "private"
+ },
+ "date": 1686087817,
+ "forward_from": {
+ "id": 1189295682,
+ "is_bot": false,
+ "first_name": "Sober",
+ "last_name": "Hacker",
+ "username": "soberHacker"
+ },
+ "forward_date": 1684404891,
+ "text": "All is good?"
+ },
+ "text": "Yes, I'm ok!"
+}
+```
+###### example 2 (topic message)
+```json
+{
+ "message_id": 9,
+ "from": {
+ "id": 1110636370,
+ "is_bot": false,
+ "first_name": "soberHacker",
+ "username": "soberhacker",
+ "language_code": "en"
+ },
+ "chat": {
+ "id": -1001110672472,
+ "title": "My Notes",
+ "is_forum": true,
+ "type": "supergroup"
+ },
+ "date": 1686514218,
+ "message_thread_id": 3,
+ "reply_to_message": {
+ "message_id": 3,
+ "from": {
+ "id": 1110636370,
+ "is_bot": false,
+ "first_name": "soberHacker",
+ "username": "soberhacker",
+ "language_code": "en"
+ },
+ "chat": {
+ "id": -1001110672472,
+ "title": "My Notes",
+ "is_forum": true,
+ "type": "supergroup"
+ },
+ "date": 1684966126,
+ "message_thread_id": 3,
+ "forum_topic_created": {
+ "name": "Topic name",
+ "icon_color": 13338331,
+ "icon_custom_emoji_id": "5312241539987020022"
+ },
+ "is_topic_message": true
+ },
+ "text": "Text texttt txet",
+ "is_topic_message": true
+}
+```
+###### example 3 (topic message without topic name)
+```json
+{
+ "message_id": 12,
+ "from": {
+ "id": 1110636370,
+ "is_bot": false,
+ "first_name": "soberHacker",
+ "username": "soberhacker",
+ "language_code": "en"
+ },
+ "chat": {
+ "id": -1001110672472,
+ "title": "My Notes",
+ "is_forum": true,
+ "type": "supergroup"
+ },
+ "date": 1686514910,
+ "message_thread_id": 3,
+ "reply_to_message": {
+ "message_id": 6,
+ "from": {
+ "id": 1110636370,
+ "is_bot": false,
+ "first_name": "soberHacker",
+ "username": "soberhacker",
+ "language_code": "en"
+ },
+ "chat": {
+ "id": -1001110672472,
+ "title": "My Notes",
+ "is_forum": true,
+ "type": "supergroup"
+ },
+ "date": 1686514023,
+ "message_thread_id": 3,
+ "text": "This is message",
+ "is_topic_message": true
+ },
+ "text": "No, I'm message",
+ "is_topic_message": true
+}
+```
\ No newline at end of file
diff --git a/docs/Template Variables List.md b/docs/Template Variables List.md
index 0873055..b71815e 100644
--- a/docs/Template Variables List.md
+++ b/docs/Template Variables List.md
@@ -1,17 +1,31 @@
-#### Note Content Template
+#### Note Content Template
###### Variables:
```ts
-โ{{chat}} - link to the chat (bot / group / channel) (not implemented)
-โ{{topic}} - topic name (not implemented)
-{{userId}} - id of the user who sent the message
+{{content}} - forwarded from + file content + message text
+{{content:text}} - only message text
+{{content:firstLine}} - first line of the message text
+{{content:XX}} - XX characters of the message text
+{{file}} - file content ![]()
+{{file:link}} - link to the file []()
+{{voiceTranscript}} - transcribing voice(video notes!) to text (same limits as for Telegram Premium subscribers)
+{{voiceTranscript:XX}} - XX symbols of transcribed voices (same limits as for Telegram Premium subscribers)
+{{chat}} - link to the chat (bot / group / channel)
+{{chatId}} - id of the chat (bot / group / channel)
+{{topic}} - link to the topic (if the topic name displays incorrect, set the name manually using bot command "/topicName NAME")
+{{topicId}} - head message id representing the topic
+{{messageId}} - message id
+{{replyMessageId}} - reply message id
{{user}} - link to the user who sent the message
-{{content:XX}} - message text: full or of specified length
-{{forwardFrom}} - link to the initial creator of the message (user / channel)
+{{userId}} - id of the user who sent the message
+{{forwardFrom}} - link to the forwarded message or its creator (user / channel)
{{messageDate:YYYYMMDD}} - date, when the message was sent
{{messageTime:HHmmss}} - time, when the message was sent
{{creationDate:YYYYMMDD}} - date, when the message was created
{{creationTime:HHmmss}} - time, when the message was created
+{{url1}} - first url from the message
+{{url1:previewYYY}} - first url preview with YYY pixels height (default 250)
+{{replace:TEXT=>WITH}} - replace or delete text in resulting note
```
###### Template example:
@@ -24,16 +38,20 @@ Source: {{chat}}-{{forwardFrom}}
Created: {{creationDate:YYYY-DD-MM}} {{creationTime:HH:mm:ss}}
```
+- If Note Content Template is unspecified, template by default will be equal {{content}}
- All available formats for dates and time you can find in [Monent JS Docs](https://momentjs.com/docs/#/parsing/string-format/)
+
+
#### Note Path Template (โ not implemented)
###### Variables:
```json
-โ{{userId:VALUE}} - only when user id equal VALUE use this path
โ{{user:VALUE}} - only when user name equal VALUE use this path
+โ{{userId:VALUE}} - only when user id equal VALUE use this path
โ{{chat:VALUE}} - only when chat name equal VALUE use this path
+โ{{chatId:VALUE}} - only when chat id equal VALUE use this path
โ{{topic:VALUE}} - only when topic name equal VALUE use this path
โ{{forwardFrom:VALUE}} - only when message creator equal VALUE use this path
```
@@ -46,8 +64,8 @@ myNotes/WorldNews/{{forwardFrom:The Washington Post}}.md
myNotes/Telegram.md
// Important channels are written in separate folders, other messages - in root folder in separate notes
-myNotes/{{chat:Recipies}}/{context:30}.md
-myNotes/{{chat:Ideas}}/{{context:firstLine}}.md
+myNotes/{{chat:Recipies}}/{content:30}.md
+myNotes/{{chat:Ideas}}/{{content:firstLine}}.md
myNotes/{{chat:Work}}/{{forwardFrom}}_{{creationDate}}.md
myNotes/{{content:20}}_{{messageDate}}_{{messageTime}}.md
@@ -61,16 +79,18 @@ myNotes/{{messageDate:YYYY}}/{{messageDate:MM}}/{{messageDate:DD}}/{{messageTime
myNotes/{{creationDate:YYYY}}/{{creationDate:MM-DD}}.{{creationTime:HH:mm:ss(SSS)}}.md
```
-- All **Note Content Template Variables** are also available here
+- **Note Content Template Variables** are also available here (except for {{file*}}, {{url1*}}, {{replace*}}, {{content}}, {{content:text}})
- Always define note names and finish paths with *".md"*
- If a note with such name exists then new data will be always appended to this notes
+
+
#### File Path Template (โ not implemented)
###### Variables:
```json
-โ{{fileType}} - file type identified by Telegram (videos, audios, voices, photos, documents...)
+โ{{fileType}} - file type identified by Telegram (video, audio, voice, photo, document...)
โ{{fileExtention}} - file extension (mp3, ogg, docx, png...)
โ{{fileName}} - unique file name assigned by Telegram (without extension)
```
@@ -82,16 +102,18 @@ myFiles/{{forwardFrom}}_{{fileName}}.{{fileExtension}}
myFiles/{{messageDate:YYYY}}/{{fileType}}.{{messageTime:HHmmss}}.{{fileName}}.{{fileExtension}}
```
-- All **Note Path Template Variables** are also available here
+- **Note Content Template Variables** are also available here (except for {{file*}}, {{url1*}}, {{replace*}}, {{content}}, {{content:text}})
- Always define file names and finish paths with *".{{fileExtention}}"*
- If a file with such name exists then new file will be created with auto-generated unique name
+
+
#### โ Not Implemented Features โ
Integrating these new features might prove challenging and time-consuming, so your assistance would be much appreciated. You can help by:
- Donating to enhance my motivation
-- Contributing to the development (branch "develop")
+- Contributing to the development (branch "[develop](https://github.com/soberhacker/obsidian-telegram-sync/tree/develop)")
[![Crypto รโ naโฎiโ n](https://img.buymeacoffee.com/button-api/?text=Crypto%20Donation&emoji=๐&slug=soberhacker&button_colour=5b5757&font_colour=ffffff&font_family=Lato&outline_colour=ffffff&coffee_colour=FFDD00)](https://oxapay.com/donate/5855474)
diff --git a/manifest.json b/manifest.json
index 433f7ea..d673723 100644
--- a/manifest.json
+++ b/manifest.json
@@ -1,7 +1,7 @@
{
"id": "telegram-sync",
"name": "Telegram Sync",
- "version": "1.6.1",
+ "version": "1.7.0",
"minAppVersion": "1.0.0",
"description": "Transfer messages and files from Telegram bot to Obsidian.",
"author": "soberHacker",
diff --git a/package-lock.json b/package-lock.json
index 612d02f..47d3516 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,23 +1,27 @@
{
"name": "obsidian-telegram-sync",
- "version": "1.6.1",
+ "version": "1.7.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "obsidian-telegram-sync",
- "version": "1.5.0",
+ "version": "1.7.0",
"license": "GNU Affero General Public License v3.0",
"dependencies": {
"@popperjs/core": "^2.11.7",
+ "@types/qrcode": "^1.5.0",
"async": "^3.2.4",
+ "linkify-it": "^4.0.1",
"mime-types": "^2.1.35",
"node-machine-id": "^1.1.12",
"node-telegram-bot-api": "^0.61.0",
+ "qrcode": "^1.5.3",
"telegram": "^2.16.4"
},
"devDependencies": {
"@types/async": "^3.2.18",
+ "@types/linkify-it": "^3.0.2",
"@types/mime-types": "^2.1.1",
"@types/node": "^16.11.6",
"@types/node-telegram-bot-api": "^0.61.6",
@@ -1024,6 +1028,12 @@
"integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==",
"dev": true
},
+ "node_modules/@types/linkify-it": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/@types/linkify-it/-/linkify-it-3.0.2.tgz",
+ "integrity": "sha512-HZQYqbiFVWufzCwexrvh694SOim8z2d+xJl5UNamcvQFejLY/2YUtzXHYi3cHdI7PMlS8ejH2slRAOJQ32aNbA==",
+ "dev": true
+ },
"node_modules/@types/mime-types": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/@types/mime-types/-/mime-types-2.1.1.tgz",
@@ -1039,8 +1049,7 @@
"node_modules/@types/node": {
"version": "16.18.23",
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.23.tgz",
- "integrity": "sha512-XAMpaw1s1+6zM+jn2tmw8MyaRDIJfXxqmIQIS0HfoGYPuf7dUWeiUKopwq13KFX9lEp1+THGtlaaYx39Nxr58g==",
- "dev": true
+ "integrity": "sha512-XAMpaw1s1+6zM+jn2tmw8MyaRDIJfXxqmIQIS0HfoGYPuf7dUWeiUKopwq13KFX9lEp1+THGtlaaYx39Nxr58g=="
},
"node_modules/@types/node-telegram-bot-api": {
"version": "0.61.6",
@@ -1065,6 +1074,14 @@
"integrity": "sha512-452/1Kp9IdM/oR10AyqAgZOxUt7eLbm+EMJ194L6oarMYdZNiFIFAOJ7IIr0OrZXTySgfHjJezh2oiyk2kc3ag==",
"dev": true
},
+ "node_modules/@types/qrcode": {
+ "version": "1.5.0",
+ "resolved": "https://registry.npmjs.org/@types/qrcode/-/qrcode-1.5.0.tgz",
+ "integrity": "sha512-x5ilHXRxUPIMfjtM+1vf/GPTRWZ81nqscursm5gMznJeK9M0YnZ1c3bEvRLQ0zSSgedLx1J6MGL231ObQGGhaA==",
+ "dependencies": {
+ "@types/node": "*"
+ }
+ },
"node_modules/@types/request": {
"version": "2.48.8",
"resolved": "https://registry.npmjs.org/@types/request/-/request-2.48.8.tgz",
@@ -1372,7 +1389,6 @@
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
- "dev": true,
"engines": {
"node": ">=8"
}
@@ -1381,7 +1397,6 @@
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dev": true,
"dependencies": {
"color-convert": "^2.0.1"
},
@@ -1712,7 +1727,6 @@
"version": "5.3.1",
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",
"integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==",
- "dev": true,
"engines": {
"node": ">=6"
}
@@ -1823,7 +1837,6 @@
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dev": true,
"dependencies": {
"color-name": "~1.1.4"
},
@@ -1834,8 +1847,7 @@
"node_modules/color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
- "dev": true
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
},
"node_modules/color-support": {
"version": "1.1.3",
@@ -2035,7 +2047,6 @@
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
"integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==",
- "dev": true,
"engines": {
"node": ">=0.10.0"
}
@@ -2124,6 +2135,11 @@
"node": ">=0.3.1"
}
},
+ "node_modules/dijkstrajs": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/dijkstrajs/-/dijkstrajs-1.0.3.tgz",
+ "integrity": "sha512-qiSlmBq9+BCdCA/L46dw8Uy93mloxsPSbwnm5yrKn2vMPiy8KyAskTF6zuV/j5BMsmOGZDPs7KjU+mjb670kfA=="
+ },
"node_modules/dir-glob": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz",
@@ -2232,8 +2248,12 @@
"node_modules/emoji-regex": {
"version": "8.0.0",
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
- "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
- "dev": true
+ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="
+ },
+ "node_modules/encode-utf8": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/encode-utf8/-/encode-utf8-1.0.3.tgz",
+ "integrity": "sha512-ucAnuBEhUK4boH2HjVYG5Q2mQyPorvv0u/ocS+zhdw0S8AlHYY+GOFhP1Gio5z4icpP2ivFSvhtFjQi8+T9ppw=="
},
"node_modules/end-of-stream": {
"version": "1.4.4",
@@ -3080,7 +3100,6 @@
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
"integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
- "dev": true,
"engines": {
"node": "6.* || 8.* || >= 10.*"
}
@@ -3694,7 +3713,6 @@
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
"integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
- "dev": true,
"engines": {
"node": ">=8"
}
@@ -4010,6 +4028,14 @@
"integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==",
"dev": true
},
+ "node_modules/linkify-it": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-4.0.1.tgz",
+ "integrity": "sha512-C7bfi1UZmoj8+PQx22XyeXCuBlokoyWQL5pWSP+EI6nzRylyThouddufc2c1NDIcP9k5agmN9fLpA7VNJfIiqw==",
+ "dependencies": {
+ "uc.micro": "^1.0.1"
+ }
+ },
"node_modules/load-json-file": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-6.2.0.tgz",
@@ -4645,7 +4671,6 @@
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
"integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==",
- "dev": true,
"engines": {
"node": ">=6"
}
@@ -4706,7 +4731,6 @@
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
"integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
- "dev": true,
"engines": {
"node": ">=8"
}
@@ -4770,6 +4794,14 @@
"node": ">=6"
}
},
+ "node_modules/pngjs": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/pngjs/-/pngjs-5.0.0.tgz",
+ "integrity": "sha512-40QW5YalBNfQo5yRYmiw7Yz6TKKVr3h6970B2YE+3fQpsWcrbj1PzJgxeJ19DRQjhMbKPIuMY8rFaXc8moolVw==",
+ "engines": {
+ "node": ">=10.13.0"
+ }
+ },
"node_modules/prelude-ls": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz",
@@ -4843,6 +4875,132 @@
"teleport": ">=0.2.0"
}
},
+ "node_modules/qrcode": {
+ "version": "1.5.3",
+ "resolved": "https://registry.npmjs.org/qrcode/-/qrcode-1.5.3.tgz",
+ "integrity": "sha512-puyri6ApkEHYiVl4CFzo1tDkAZ+ATcnbJrJ6RiBM1Fhctdn/ix9MTE3hRph33omisEbC/2fcfemsseiKgBPKZg==",
+ "dependencies": {
+ "dijkstrajs": "^1.0.1",
+ "encode-utf8": "^1.0.3",
+ "pngjs": "^5.0.0",
+ "yargs": "^15.3.1"
+ },
+ "bin": {
+ "qrcode": "bin/qrcode"
+ },
+ "engines": {
+ "node": ">=10.13.0"
+ }
+ },
+ "node_modules/qrcode/node_modules/cliui": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz",
+ "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==",
+ "dependencies": {
+ "string-width": "^4.2.0",
+ "strip-ansi": "^6.0.0",
+ "wrap-ansi": "^6.2.0"
+ }
+ },
+ "node_modules/qrcode/node_modules/find-up": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
+ "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
+ "dependencies": {
+ "locate-path": "^5.0.0",
+ "path-exists": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/qrcode/node_modules/locate-path": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
+ "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
+ "dependencies": {
+ "p-locate": "^4.1.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/qrcode/node_modules/p-limit": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
+ "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
+ "dependencies": {
+ "p-try": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/qrcode/node_modules/p-locate": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
+ "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
+ "dependencies": {
+ "p-limit": "^2.2.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/qrcode/node_modules/wrap-ansi": {
+ "version": "6.2.0",
+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz",
+ "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==",
+ "dependencies": {
+ "ansi-styles": "^4.0.0",
+ "string-width": "^4.1.0",
+ "strip-ansi": "^6.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/qrcode/node_modules/y18n": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz",
+ "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ=="
+ },
+ "node_modules/qrcode/node_modules/yargs": {
+ "version": "15.4.1",
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz",
+ "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==",
+ "dependencies": {
+ "cliui": "^6.0.0",
+ "decamelize": "^1.2.0",
+ "find-up": "^4.1.0",
+ "get-caller-file": "^2.0.1",
+ "require-directory": "^2.1.1",
+ "require-main-filename": "^2.0.0",
+ "set-blocking": "^2.0.0",
+ "string-width": "^4.2.0",
+ "which-module": "^2.0.0",
+ "y18n": "^4.0.0",
+ "yargs-parser": "^18.1.2"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/qrcode/node_modules/yargs-parser": {
+ "version": "18.1.3",
+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz",
+ "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==",
+ "dependencies": {
+ "camelcase": "^5.0.0",
+ "decamelize": "^1.2.0"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
"node_modules/qs": {
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz",
@@ -5201,11 +5359,15 @@
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
"integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==",
- "dev": true,
"engines": {
"node": ">=0.10.0"
}
},
+ "node_modules/require-main-filename": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz",
+ "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg=="
+ },
"node_modules/resolve": {
"version": "1.22.3",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.3.tgz",
@@ -5344,8 +5506,7 @@
"node_modules/set-blocking": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
- "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==",
- "dev": true
+ "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw=="
},
"node_modules/shebang-command": {
"version": "2.0.0",
@@ -5554,7 +5715,6 @@
"version": "4.2.3",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
"integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
- "dev": true,
"dependencies": {
"emoji-regex": "^8.0.0",
"is-fullwidth-code-point": "^3.0.0",
@@ -5610,7 +5770,6 @@
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
- "dev": true,
"dependencies": {
"ansi-regex": "^5.0.1"
},
@@ -5931,6 +6090,11 @@
"node": ">=4.2.0"
}
},
+ "node_modules/uc.micro": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz",
+ "integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA=="
+ },
"node_modules/uglify-js": {
"version": "3.17.4",
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz",
@@ -6162,6 +6326,11 @@
"url": "https://github.com/sponsors/ljharb"
}
},
+ "node_modules/which-module": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.1.tgz",
+ "integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ=="
+ },
"node_modules/which-typed-array": {
"version": "1.1.9",
"resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.9.tgz",
diff --git a/package.json b/package.json
index 06c2982..468bdac 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "obsidian-telegram-sync",
- "version": "1.6.1",
+ "version": "1.7.0",
"description": "Transfer messages and files from Telegram bot to Obsidian.",
"main": "main.js",
"scripts": {
@@ -22,6 +22,7 @@
"license": "GNU Affero General Public License v3.0",
"devDependencies": {
"@types/async": "^3.2.18",
+ "@types/linkify-it": "^3.0.2",
"@types/mime-types": "^2.1.1",
"@types/node": "^16.11.6",
"@types/node-telegram-bot-api": "^0.61.6",
@@ -40,10 +41,13 @@
},
"dependencies": {
"@popperjs/core": "^2.11.7",
+ "@types/qrcode": "^1.5.0",
"async": "^3.2.4",
+ "linkify-it": "^4.0.1",
"mime-types": "^2.1.35",
"node-machine-id": "^1.1.12",
"node-telegram-bot-api": "^0.61.0",
+ "qrcode": "^1.5.3",
"telegram": "^2.16.4"
}
}
diff --git a/release-notes.mjs b/release-notes.mjs
index 1b5fca3..fc66e5b 100644
--- a/release-notes.mjs
+++ b/release-notes.mjs
@@ -1,25 +1,51 @@
-// if "!"" in version code then notify user about latest release
-export const pluginVersion = "1.6.1!";
-// change session name when changes in plugin require new client authorization
-export const sessionName = "telegram_sync_160";
+export const version = "1.7.0";
+// TODO in github actions creating an archive with 3 main files for easy installing
+// TODO Add Demo gif and screenshots to readme.md
+// ## Demo
+//![](https://raw.githubusercontent.com/vslinko/obsidian-outliner/main/demos/demo1.gif)