From 3b75f184116ec367981ef16df921c5439a029ef7 Mon Sep 17 00:00:00 2001 From: Burtasov Date: Sat, 15 Jul 2023 15:23:56 +0100 Subject: [PATCH 1/6] fix: undefined in the beginning of text --- src/telegram/message/handlers.ts | 12 +++++++++--- src/telegram/message/processors.ts | 27 ++++++++++----------------- src/utils/fsUtils.ts | 7 +++++++ 3 files changed, 26 insertions(+), 20 deletions(-) diff --git a/src/telegram/message/handlers.ts b/src/telegram/message/handlers.ts index c1c7e20..f154476 100644 --- a/src/telegram/message/handlers.ts +++ b/src/telegram/message/handlers.ts @@ -1,13 +1,13 @@ import TelegramSyncPlugin from "../../main"; import TelegramBot from "node-telegram-bot-api"; -import { createFolderIfNotExist, getUniqueFilePath } from "src/utils/fsUtils"; +import { createFolderIfNotExist, getTelegramMdPath, getUniqueFilePath } from "src/utils/fsUtils"; import * as release from "../../../release-notes.mjs"; import { buyMeACoffeeLink, boostyLink, kofiLink, paypalLink } from "../../settings/donation"; import { SendMessageOptions } from "node-telegram-bot-api"; import path from "path"; import * as GramJs from "../GramJs/client"; import { extension } from "mime-types"; -import { applyNoteContentTemplate, finalizeMessageProcessing, getTelegramMdPath } from "./processors"; +import { applyNoteContentTemplate, finalizeMessageProcessing } from "./processors"; import { ProgressBarType, createProgressBar, deleteProgressBar, updateProgressBar } from "../progressBar"; import { getFileObject } from "./getters"; import { TFile } from "obsidian"; @@ -188,7 +188,13 @@ export async function handleFiles(plugin: TelegramSyncPlugin, msg: TelegramBot.M } if (plugin.settings.appendAllToTelegramMd) { - const noteContent = await createNoteContent(plugin, filePath, getTelegramMdPath(plugin), error, msg); + const noteContent = await createNoteContent( + plugin, + filePath, + getTelegramMdPath(plugin.app.vault, plugin.settings.newNotesLocation), + error, + msg + ); plugin.messageQueueToTelegramMd.push({ msg, formattedContent: noteContent, error }); return; } else if (msg.caption || telegramFileName) { diff --git a/src/telegram/message/processors.ts b/src/telegram/message/processors.ts index 43c4e0a..3105ee1 100644 --- a/src/telegram/message/processors.ts +++ b/src/telegram/message/processors.ts @@ -1,7 +1,7 @@ import TelegramBot from "node-telegram-bot-api"; import TelegramSyncPlugin from "../../main"; import { getChatLink, getForwardFromLink, getReplyMessageId, getTopicLink, getUrl, getUserLink } from "./getters"; -import { createFolderIfNotExist } from "src/utils/fsUtils"; +import { getTelegramMdPath } from "src/utils/fsUtils"; import { TFile, normalizePath } from "obsidian"; import { formatDateTime } from "../../utils/dateUtils"; import { _15sec, _1h, _5sec, displayAndLog, displayAndLogError } from "src/utils/logUtils"; @@ -62,7 +62,7 @@ export async function appendMessageToTelegramMd( // Do not append messages if not connected if (!plugin.botConnected) return; - const telegramMdPath = getTelegramMdPath(plugin); + const telegramMdPath = getTelegramMdPath(plugin.app.vault, plugin.settings.newNotesLocation); let telegramMdFile = plugin.app.vault.getAbstractFileByPath(telegramMdPath) as TFile; // Create or modify the Telegram.md file @@ -192,17 +192,18 @@ function addLeadingForEveryLine(text: string, leadingChars?: string): string { } function processText(text: string, leadingChars?: string, property?: string): string { - if (!property || property.toLowerCase() == "text") return addLeadingForEveryLine(text, leadingChars); - if (property.toLowerCase() == "firstline") return leadingChars + text.split("\n")[0]; - if (property.toLowerCase() == "nofirstline") { + let finalText = ""; + const lowerCaseProperty = (property && property.toLowerCase()) || "text"; + if (lowerCaseProperty == "text") finalText = text; + if (lowerCaseProperty == "firstline") finalText = text.split("\n")[0]; + if (lowerCaseProperty == "nofirstline") { let lines = text.split("\n"); lines = lines.slice(1); - return leadingChars + lines.join("\n"); + finalText = lines.join("\n"); } // if property is length - if (Number.isInteger(parseFloat(property || ""))) - return addLeadingForEveryLine(text.substring(0, Number(property)), leadingChars); - return ""; + if (Number.isInteger(parseFloat(lowerCaseProperty))) finalText = text.substring(0, Number(property)); + return addLeadingForEveryLine(finalText, leadingChars); } function pasteText( @@ -228,11 +229,3 @@ function pasteText( .replace(allRE, pasteContent) .replace(propertyRE, (_, property: string) => processText(pasteText, undefined, property)); } - -export function getTelegramMdPath(plugin: TelegramSyncPlugin) { - // Determine the location for the Telegram.md file - const location = plugin.settings.newNotesLocation || ""; - createFolderIfNotExist(plugin.app.vault, location); - const telegramMdPath = normalizePath(location ? `${location}/Telegram.md` : "Telegram.md"); - return telegramMdPath; -} diff --git a/src/utils/fsUtils.ts b/src/utils/fsUtils.ts index 383ff39..1db2782 100644 --- a/src/utils/fsUtils.ts +++ b/src/utils/fsUtils.ts @@ -61,6 +61,13 @@ export async function getUniqueFilePath( return filePath; } +export function getTelegramMdPath(vault: Vault, location: string) { + // Determine the location for the Telegram.md file + createFolderIfNotExist(vault, location); + const telegramMdPath = normalizePath(location ? `${location}/Telegram.md` : "Telegram.md"); + return telegramMdPath; +} + export function base64ToString(base64: string): string { return Buffer.from(base64, "base64").toString("utf-8"); } From c95e27771ede0af8dc47bac33d898d39282b06fe Mon Sep 17 00:00:00 2001 From: Burtasov Date: Sat, 15 Jul 2023 17:07:11 +0100 Subject: [PATCH 2/6] fix: connectiong as user --- src/main.ts | 14 ++++++-------- src/settings/Settings.ts | 4 ++-- src/settings/UserLogInModal.ts | 22 ++++++++++++++++++++++ src/telegram/GramJs/client.ts | 6 ++++-- src/telegram/message/handlers.ts | 14 ++++++-------- src/telegram/message/processors.ts | 13 +++++++------ src/utils/logUtils.ts | 3 +-- 7 files changed, 48 insertions(+), 28 deletions(-) diff --git a/src/main.ts b/src/main.ts index fbc81bc..480b056 100644 --- a/src/main.ts +++ b/src/main.ts @@ -158,7 +158,7 @@ export default class TelegramSyncPlugin extends Plugin { if ( this.settings.telegramSessionType == "bot" || - (this.settings.telegramSessionType == "user" && !this.userConnected) + (this.settings.telegramSessionType == "user" && !this.userConnected && sessionId) ) { await GramJs.signInAsBot(this.settings.botToken); } @@ -187,13 +187,12 @@ export default class TelegramSyncPlugin extends Plugin { } } } - - async handlePollingError(error: unknown) { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + async handlePollingError(error: any) { let pollingError = "unknown"; try { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - const errorCode = (error as any).response.body.error_code; + const errorCode = error.response.body.error_code; if (errorCode === 409) { pollingError = "twoBotInstances"; @@ -204,8 +203,7 @@ export default class TelegramSyncPlugin extends Plugin { } } catch { try { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - pollingError = (error as any).code === "EFATAL" ? "fatalError" : pollingError; + pollingError = error.code === "EFATAL" ? "fatalError" : pollingError; } catch { pollingError = "unknown"; } @@ -215,7 +213,7 @@ export default class TelegramSyncPlugin extends Plugin { this.lastPollingErrors.push(pollingError); if (!(pollingError == "twoBotInstances")) { this.botConnected = false; - await displayAndLogError(this, `${error} \n\nTelegram bot is disconnected!`); + await displayAndLogError(this, new Error(`${error} \n\nTelegram bot is disconnected!`)); } } diff --git a/src/settings/Settings.ts b/src/settings/Settings.ts index c47c100..77dbbbd 100644 --- a/src/settings/Settings.ts +++ b/src/settings/Settings.ts @@ -29,9 +29,9 @@ export interface TelegramSyncSettings { pluginVersion: string; appId: string; apiHash: string; - topicNames: TopicName[]; telegramSessionType: GramJs.SessionType; telegramSessionId: number; + topicNames: TopicName[]; } export const DEFAULT_SETTINGS: TelegramSyncSettings = { @@ -47,9 +47,9 @@ export const DEFAULT_SETTINGS: TelegramSyncSettings = { // TODO Check for not public appId, apiHash how are often flood wait blocks and the level of downloading speed appId: "17349", // public, ok to be here apiHash: "344583e45741c457fe1862106095a5eb", // public, ok to be here - topicNames: [], telegramSessionType: "bot", telegramSessionId: GramJs.getNewSessionId(), + topicNames: [], }; export class TelegramSyncSettingTab extends PluginSettingTab { diff --git a/src/settings/UserLogInModal.ts b/src/settings/UserLogInModal.ts index 594ba72..7c3f175 100644 --- a/src/settings/UserLogInModal.ts +++ b/src/settings/UserLogInModal.ts @@ -50,6 +50,7 @@ export class UserLogInModal extends Modal { .addButton((b) => { b.setButtonText("Generate QR code"); b.onClick(async () => { + startQrCodeGenerating(); try { await this.plugin.initTelegramClient("user"); await GramJs.signInAsUserWithQrCode(this.qrCodeContainer, this.password); @@ -58,6 +59,7 @@ export class UserLogInModal extends Modal { displayAndLog(this.plugin, "Successfully logged in", _5sec); } } catch (e) { + errorQrCodeGenerating(e); await displayAndLogError(this.plugin, e, undefined, _15sec); } }); @@ -88,6 +90,26 @@ export class UserLogInModal extends Modal { } } +function cleanQrContainer() { + while (this.qrCodeContainer.firstChild) { + this.qrCodeContainer.removeChild(this.qrCodeContainer.firstChild); + } +} + +function startQrCodeGenerating() { + cleanQrContainer(); + // Create a new HTML element for the loading message + const loadingMessage = this.qrCodeContainer.createDiv("QR code\ngenerating..."); + loadingMessage.style.color = "blue"; +} + +function errorQrCodeGenerating(e: Error) { + cleanQrContainer(); + // Create a new HTML element for the error message + const errorMessage = this.qrCodeContainer.createDiv(e); + errorMessage.style.color = "red"; +} + // addClientAuthorizationDescription() { // const clientAuthorizationDescription = new Setting(this.containerEl).setDesc( // "Entering api_id and api_hash is required for downloading files over 20MB." diff --git a/src/telegram/GramJs/client.ts b/src/telegram/GramJs/client.ts index 52dca9e..3a36ee4 100644 --- a/src/telegram/GramJs/client.ts +++ b/src/telegram/GramJs/client.ts @@ -81,7 +81,8 @@ export async function init( const authorized = await client.checkAuthorization(); if (sessionType == "user" && authorized && (await client.isBot())) throw new Error("Stored session conflict. Try to log in again."); - if (!_clientUser && authorized) _clientUser = (await client.getMe()) as Api.User; + if (!authorized) _clientUser = undefined; + else if (!_clientUser && authorized) _clientUser = (await client.getMe()) as Api.User; } catch (e) { if (sessionType == "user") { await init(_sessionId, "bot", apiId, apiHash, deviceId); @@ -134,7 +135,8 @@ export async function signInAsBot(botToken: string) { export async function signInAsUserWithQrCode(container: HTMLDivElement, password?: string) { if (!client) throw NotConnected; - if ((await client.checkAuthorization()) && (await client.isBot())) new Error("User session is missed"); + if ((await client.checkAuthorization()) && (await client.isBot())) + throw new Error("User session is missed. Try to restart the plugin or Obsidian"); await client .signInUserWithQrCode( { apiId: _apiId, apiHash: _apiHash }, diff --git a/src/telegram/message/handlers.ts b/src/telegram/message/handlers.ts index f154476..8746e66 100644 --- a/src/telegram/message/handlers.ts +++ b/src/telegram/message/handlers.ts @@ -79,9 +79,8 @@ async function createNoteContent( plugin: TelegramSyncPlugin, filePath: string, notePath: string, - // eslint-disable-next-line @typescript-eslint/no-explicit-any - error: any, - msg: TelegramBot.Message + msg: TelegramBot.Message, + error?: Error ) { let fileLink: string; @@ -103,8 +102,7 @@ export async function handleFiles(plugin: TelegramSyncPlugin, msg: TelegramBot.M await createFolderIfNotExist(plugin.app.vault, basePath); let filePath = ""; let telegramFileName = ""; - // eslint-disable-next-line @typescript-eslint/no-explicit-any - let error: any; + let error: Error | undefined = undefined; try { // Iterate through each file type @@ -192,8 +190,8 @@ export async function handleFiles(plugin: TelegramSyncPlugin, msg: TelegramBot.M plugin, filePath, getTelegramMdPath(plugin.app.vault, plugin.settings.newNotesLocation), - error, - msg + msg, + error ); plugin.messageQueueToTelegramMd.push({ msg, formattedContent: noteContent, error }); return; @@ -208,7 +206,7 @@ export async function handleFiles(plugin: TelegramSyncPlugin, msg: TelegramBot.M msg.date ); - const noteContent = await createNoteContent(plugin, filePath, notePath, error, msg); + const noteContent = await createNoteContent(plugin, filePath, notePath, msg, error); await plugin.app.vault.create(notePath, noteContent); } diff --git a/src/telegram/message/processors.ts b/src/telegram/message/processors.ts index 3105ee1..0c4e244 100644 --- a/src/telegram/message/processors.ts +++ b/src/telegram/message/processors.ts @@ -10,8 +10,7 @@ import { convertMessageTextToMarkdown, escapeRegExp } from "./convertToMarkdown" import * as GramJs from "../GramJs/client"; // Delete a message or send a confirmation reply based on settings and message age -// eslint-disable-next-line @typescript-eslint/no-explicit-any -export async function finalizeMessageProcessing(plugin: TelegramSyncPlugin, msg: TelegramBot.Message, error?: any) { +export async function finalizeMessageProcessing(plugin: TelegramSyncPlugin, msg: TelegramBot.Message, error?: Error) { if (error) await displayAndLogError(plugin, error, msg, _5sec); if (error || !plugin.bot) { return; @@ -37,17 +36,19 @@ export async function finalizeMessageProcessing(plugin: TelegramSyncPlugin, msg: await deleteProgressBar(plugin.bot, msg, progressBarMessage); } else { let needReply = true; - let error = ""; + let errorMessage = ""; try { if (plugin.userConnected && plugin.botUser) { await GramJs.syncSendReaction(plugin.botUser, msg); needReply = false; } } catch (e) { - error = `\n\nCan't "like" the message, because ${e}`; + errorMessage = `\n\nCan't "like" the message, because ${e}`; } if (needReply) { - await plugin.bot?.sendMessage(msg.chat.id, "...✅..." + error, { reply_to_message_id: msg.message_id }); + await plugin.bot?.sendMessage(msg.chat.id, "...✅..." + errorMessage, { + reply_to_message_id: msg.message_id, + }); } } } @@ -57,7 +58,7 @@ export async function appendMessageToTelegramMd( msg: TelegramBot.Message, formattedContent: string, // eslint-disable-next-line @typescript-eslint/no-explicit-any - error?: any + error?: Error ) { // Do not append messages if not connected if (!plugin.botConnected) return; diff --git a/src/utils/logUtils.ts b/src/utils/logUtils.ts index 1a7a6f2..5412d8a 100644 --- a/src/utils/logUtils.ts +++ b/src/utils/logUtils.ts @@ -26,8 +26,7 @@ export function displayAndLog(plugin: TelegramSyncPlugin, message: string, timeo // Show error to console, telegram, display export async function displayAndLogError( plugin: TelegramSyncPlugin, - // eslint-disable-next-line @typescript-eslint/no-explicit-any - error: any, + error: Error, msg?: TelegramBot.Message, timeout?: number ) { From 85a333ef0e595e31c73329bc30f78178310b4b38 Mon Sep 17 00:00:00 2001 From: Burtasov Date: Sat, 15 Jul 2023 19:32:22 +0100 Subject: [PATCH 3/6] chore: refactor qr code state informing --- release-notes.mjs | 2 +- src/settings/Settings.ts | 14 ++++++++++++-- src/settings/UserLogInModal.ts | 35 +++++++++++++--------------------- 3 files changed, 26 insertions(+), 25 deletions(-) diff --git a/release-notes.mjs b/release-notes.mjs index e5ea96f..42066aa 100644 --- a/release-notes.mjs +++ b/release-notes.mjs @@ -1,4 +1,4 @@ -export const version = "1.8.0"; +export const version = "1.8.1"; // TODO add Demo gif and screenshots to readme.md // TODO add thanks for last patrons in donation section // TODO add notification about new version of Telegram Sync and link to the channel diff --git a/src/settings/Settings.ts b/src/settings/Settings.ts index 77dbbbd..cd4913e 100644 --- a/src/settings/Settings.ts +++ b/src/settings/Settings.ts @@ -9,7 +9,7 @@ import * as GramJs from "src/telegram/GramJs/client"; import { BotSettingsModal } from "./BotSettingsModal"; import { UserLogInModal } from "./UserLogInModal"; import { version } from "release-notes.mjs"; -import { _5sec } from "src/utils/logUtils"; +import { _15sec, _5sec, displayAndLog } from "src/utils/logUtils"; export interface TopicName { name: string; @@ -161,12 +161,22 @@ export class TelegramSyncSettingTab extends PluginSettingTab { if (this.plugin.settings.telegramSessionType == "user") { // Log Out await this.plugin.initTelegramClient("bot"); + displayAndLog( + this.plugin, + "Successfully logged out.\n\nBut you should also terminate the session manually in the Telegram app.", + _15sec + ); userStatusConstructor.call(this, userStatusComponent); userLogInConstructor.call(this, userLogInButton); } else { // Log In + const initialSessionType = this.plugin.settings.telegramSessionType; const userLogInModal = new UserLogInModal(this.plugin); userLogInModal.onClose = async () => { + if (initialSessionType == "bot" && !this.plugin.userConnected) { + this.plugin.settings.telegramSessionType = initialSessionType; + this.plugin.saveSettings(); + } userStatusConstructor.call(this, userStatusComponent); userLogInConstructor.call(this, userLogInButton); }; @@ -180,7 +190,7 @@ export class TelegramSyncSettingTab extends PluginSettingTab { .setDesc("Connect your telegram user. It's required only for ") .addText(userStatusConstructor) .addButton(userLogInConstructor); - + // TODO removing Refresh button if this.plugin.settings.telegramSessionType changed to "bot" (when Log out, etc) if (this.plugin.settings.telegramSessionType == "user" && !this.plugin.userConnected) { userSettings.addExtraButton((refreshButton) => { refreshButton.setTooltip("Refresh"); diff --git a/src/settings/UserLogInModal.ts b/src/settings/UserLogInModal.ts index 7c3f175..16ff7ae 100644 --- a/src/settings/UserLogInModal.ts +++ b/src/settings/UserLogInModal.ts @@ -1,7 +1,6 @@ import { Modal, Setting } from "obsidian"; import TelegramSyncPlugin from "src/main"; import * as GramJs from "src/telegram/GramJs/client"; -import { _15sec, _5sec, displayAndLog, displayAndLogError } from "src/utils/logUtils"; export class UserLogInModal extends Modal { botSetingsDiv: HTMLDivElement; @@ -50,17 +49,16 @@ export class UserLogInModal extends Modal { .addButton((b) => { b.setButtonText("Generate QR code"); b.onClick(async () => { - startQrCodeGenerating(); + await this.showQrCodeGeneratingState("🔵 QR code generating...\n", "#007BFF"); try { await this.plugin.initTelegramClient("user"); await GramJs.signInAsUserWithQrCode(this.qrCodeContainer, this.password); if (await GramJs.isAuthorizedAsUser()) { this.plugin.userConnected = true; - displayAndLog(this.plugin, "Successfully logged in", _5sec); + await this.showQrCodeGeneratingState("🟢 Successfully logged in!\n", "#008000"); } } catch (e) { - errorQrCodeGenerating(e); - await displayAndLogError(this.plugin, e, undefined, _15sec); + await this.showQrCodeGeneratingState(`🔴 ${e}\n`, "#FF0000"); } }); }); @@ -88,26 +86,19 @@ export class UserLogInModal extends Modal { onOpen() { this.display(); } -} -function cleanQrContainer() { - while (this.qrCodeContainer.firstChild) { - this.qrCodeContainer.removeChild(this.qrCodeContainer.firstChild); + cleanQrContainer() { + while (this.qrCodeContainer.firstChild) { + this.qrCodeContainer.removeChild(this.qrCodeContainer.firstChild); + } } -} -function startQrCodeGenerating() { - cleanQrContainer(); - // Create a new HTML element for the loading message - const loadingMessage = this.qrCodeContainer.createDiv("QR code\ngenerating..."); - loadingMessage.style.color = "blue"; -} - -function errorQrCodeGenerating(e: Error) { - cleanQrContainer(); - // Create a new HTML element for the error message - const errorMessage = this.qrCodeContainer.createDiv(e); - errorMessage.style.color = "red"; + async showQrCodeGeneratingState(text: string, color?: string) { + this.cleanQrContainer(); + const message = this.qrCodeContainer.createEl("pre", { text }); + if (color) message.style.color = color; + message.style.fontWeight = "bold"; + } } // addClientAuthorizationDescription() { From 73876756421a7aab545f91ac1840ebf8cc15fbee Mon Sep 17 00:00:00 2001 From: Burtasov Date: Sat, 15 Jul 2023 20:31:58 +0100 Subject: [PATCH 4/6] fix: missing bot restarting if no internet at run --- src/main.ts | 16 ++++++++++++---- src/telegram/GramJs/client.ts | 10 ++++++++-- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/src/main.ts b/src/main.ts index 480b056..c6022f0 100644 --- a/src/main.ts +++ b/src/main.ts @@ -116,11 +116,18 @@ export default class TelegramSyncPlugin extends Plugin { try { // Check if the bot is connected and set the connected flag accordingly - this.botUser = await this.bot.getMe(); - await this.bot.startPolling(); + try { + this.botUser = await this.bot.getMe(); + } finally { + await this.bot.startPolling(); + } this.botConnected = true; } catch (e) { - displayAndLog(this, `${e}\n\nTelegram Bot is disconnected!`); + if (!this.bot || !this.bot.isPolling()) + displayAndLog( + this, + `${e}\n\nTelegram Bot is disconnected.\n\nCheck internet(proxy) connection, the functionality of Telegram using the official app. If everithing is ok, restart Obsidian.` + ); } } @@ -227,7 +234,8 @@ export default class TelegramSyncPlugin extends Plugin { } async checkConnectionAfterError(intervalInSeconds = 30) { - if (this.checkingBotConnection || this.botConnected || !this.bot || !this.bot.isPolling()) return; + if (this.checkingBotConnection || !this.bot || !this.bot.isPolling()) return; + if (!this.checkingBotConnection && this.botConnected) this.lastPollingErrors = []; try { this.checkingBotConnection = true; await new Promise((resolve) => setTimeout(resolve, intervalInSeconds * _1sec)); diff --git a/src/telegram/GramJs/client.ts b/src/telegram/GramJs/client.ts index 3a36ee4..018e634 100644 --- a/src/telegram/GramJs/client.ts +++ b/src/telegram/GramJs/client.ts @@ -35,8 +35,14 @@ export function getNewSessionId(): number { // Stop the bot polling export async function stop() { - if (client) { - await client.destroy(); + try { + if (client) { + client.setLogLevel(LogLevel.NONE); + await client.destroy(); + } + } catch { + /* empty */ + } finally { client = undefined; _botToken = undefined; _voiceTranscripts = undefined; From 7a9310eede02664fcc532e0c833531a1ee0bf6ed Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 15 Jul 2023 23:17:09 +0000 Subject: [PATCH 5/6] chore: update version of package to 1.8.1 --- CHANGELOG.md | 9 +++++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dc650d0..271e8d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,15 @@ # Changelog +## [1.8.1](https://github.com/soberhacker/obsidian-telegram-sync/compare/1.8.0...1.8.1) (2023-07-15) + + +### Bug Fixes + +* connectiong as user ([c95e277](https://github.com/soberhacker/obsidian-telegram-sync/commit/c95e27771ede0af8dc47bac33d898d39282b06fe)) +* missing bot restarting if no internet at run ([7387675](https://github.com/soberhacker/obsidian-telegram-sync/commit/73876756421a7aab545f91ac1840ebf8cc15fbee)) +* undefined in the beginning of text ([3b75f18](https://github.com/soberhacker/obsidian-telegram-sync/commit/3b75f184116ec367981ef16df921c5439a029ef7)) + ## [1.8.0](https://github.com/soberhacker/obsidian-telegram-sync/compare/1.7.1...1.8.0) (2023-07-14) diff --git a/package-lock.json b/package-lock.json index 35df1ad..5571a1d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "obsidian-telegram-sync", - "version": "1.8.0", + "version": "1.8.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "obsidian-telegram-sync", - "version": "1.8.0", + "version": "1.8.1", "license": "GNU Affero General Public License v3.0", "dependencies": { "@popperjs/core": "^2.11.7", diff --git a/package.json b/package.json index aaaf155..1ca1ecf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "obsidian-telegram-sync", - "version": "1.8.0", + "version": "1.8.1", "description": "Transfer messages and files from Telegram bot to Obsidian.", "main": "main.js", "scripts": { From 57e14b97f2263f816f086c6628c5bee579e6987e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 15 Jul 2023 23:17:23 +0000 Subject: [PATCH 6/6] chore: update version of plugin to 1.8.1 --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index d81bcc3..78aba68 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "telegram-sync", "name": "Telegram Sync", - "version": "1.8.0", + "version": "1.8.1", "minAppVersion": "1.0.0", "description": "Transfer messages and files from Telegram to Obsidian.", "author": "soberhacker",