diff --git a/gramjs/sessions/StoreSession.ts b/gramjs/sessions/StoreSession.ts index f032167d..4303ad2b 100644 --- a/gramjs/sessions/StoreSession.ts +++ b/gramjs/sessions/StoreSession.ts @@ -9,6 +9,9 @@ export class StoreSession extends MemorySession { constructor(sessionName: string, divider = ":") { super(); + if (sessionName === "session") { + throw new Error("Session name can't be 'session'. Please use a different name."); + } if (typeof localStorage === "undefined" || localStorage === null) { const LocalStorage = require("./localStorage").LocalStorage; this.store = store.area(