Skip to content

Commit

Permalink
Merge pull request #125 from soberhacker/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
soberhacker authored Jun 9, 2023
2 parents 257505e + da1d79d commit 5bd1ec0
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 6 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# Changelog


## [1.6.1](https://github.com/soberhacker/obsidian-telegram-sync/compare/1.6.0...1.6.1) (2023-06-09)


### Bug Fixes

* API_ID_PUBLISHED_FLOOD during loading plugin ([ee96f32](https://github.com/soberhacker/obsidian-telegram-sync/commit/ee96f32e09dbe52aa8309049471678e6e2edb7ea))

## [1.6.0](https://github.com/soberhacker/obsidian-telegram-sync/compare/1.5.0...1.6.0) (2023-06-08)


Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "telegram-sync",
"name": "Telegram Sync",
"version": "1.6.0",
"version": "1.6.1",
"minAppVersion": "1.0.0",
"description": "Transfer messages and files from Telegram bot to Obsidian.",
"author": "soberHacker",
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "obsidian-telegram-sync",
"version": "1.6.0",
"version": "1.6.1",
"description": "Transfer messages and files from Telegram bot to Obsidian.",
"main": "main.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion release-notes.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// if "!"" in version code then notify user about latest release
export const pluginVersion = "1.6.0!";
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 newFeatures = `
Expand Down
6 changes: 4 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,14 @@ export default class TelegramSyncPlugin extends Plugin {

async initTelegramClient() {
try {
if (this.settings.appId !== "" && this.settings.apiHash !== "") {
if (this.settings.appId !== "" && this.settings.apiHash !== "" && this.settings.botToken !== "") {
await GramJs.initClient(+this.settings.appId, this.settings.apiHash, this.currentDeviceId);
await GramJs.signInBot(this.settings.botToken);
}
} catch (e) {
await displayAndLogError(this, e, undefined, 60000);
if (!e.message.includes("API_ID_PUBLISHED_FLOOD")) {
await displayAndLogError(this, e, undefined, 60000);
}
}
}

Expand Down
1 change: 1 addition & 0 deletions src/settings/Settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ export class TelegramSyncSettingTab extends PluginSettingTab {
this.plugin.settings.botToken = value;
await this.plugin.saveSettings();
this.plugin.initTelegramBot(); // Initialize the bot with the new token
this.plugin.initTelegramClient();
})
);

Expand Down

0 comments on commit 5bd1ec0

Please sign in to comment.