chz-telegram-bot 0.7.15 → 0.7.16

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.
@@ -93,7 +93,7 @@ export class JsonFileStorage {
93
93
  async updateStateFor(action, chatId, update) {
94
94
  await this.lock(action.key, async () => {
95
95
  const data = this.data.load(action);
96
- const state = data[chatId];
96
+ const state = data[chatId] ?? action.stateConstructor();
97
97
  await update(state);
98
98
  data[chatId] = state;
99
99
  await this.data.save(data, action);
package/package.json CHANGED
@@ -14,7 +14,7 @@
14
14
  "type": "git",
15
15
  "url": "https://github.com/AlexSolari/botFramework.git"
16
16
  },
17
- "version": "0.7.15",
17
+ "version": "0.7.16",
18
18
  "type": "module",
19
19
  "dependencies": {
20
20
  "async-sema": "^3.1.1",