evogram-gramjs 1.0.0 → 1.0.1

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.
@@ -67,9 +67,11 @@ class SessionManager extends events_1.EventEmitter {
67
67
  });
68
68
  yield client.connect();
69
69
  client.addEventHandler((event) => tslib_1.__awaiter(this, void 0, void 0, function* () {
70
- var _a, _b;
70
+ var _a, _b, _c, _d;
71
71
  if ((_b = (yield ((_a = this.getSession(config.sessionId)) === null || _a === void 0 ? void 0 : _a.db()))) === null || _b === void 0 ? void 0 : _b.error)
72
72
  return;
73
+ else if (!((_d = (yield ((_c = this.getSession(config.sessionId)) === null || _c === void 0 ? void 0 : _c.db()))) === null || _d === void 0 ? void 0 : _d.sessionString))
74
+ return;
73
75
  if (event instanceof network_1.UpdateConnectionState) {
74
76
  const error = yield client
75
77
  .getMe()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "evogram-gramjs",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "main": "./lib/index.js",
5
5
  "license": "MIT",
6
6
  "dependencies": {
@@ -64,6 +64,7 @@ export class SessionManager extends EventEmitter {
64
64
 
65
65
  client.addEventHandler(async (event) => {
66
66
  if ((await this.getSession(config.sessionId)?.db())?.error) return
67
+ else if (!(await this.getSession(config.sessionId)?.db())?.sessionString) return
67
68
 
68
69
  if (event instanceof UpdateConnectionState) {
69
70
  const error = await client