telegraf-postgres-session
Advanced tools
Comparing version 1.0.2 to 1.0.4
{ | ||
"name": "telegraf-postgres-session", | ||
"version": "1.0.2", | ||
"version": "1.0.4", | ||
"description": "A middleware session for telegraf", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -10,3 +10,3 @@ # PostgreSQL session middleware for Telegraf | ||
```SQL | ||
CREATE TABLE postgress_sessions(id varchar, session varchar); | ||
CREATE TABLE postgress_sessions(id varchar PRIMARY KEY, session varchar); | ||
``` | ||
@@ -36,2 +36,2 @@ | ||
``` | ||
The database connection configuration is described in The [PostgreSQL API](https://node-postgres.com). | ||
The database connection configuration is described in The [PostgreSQL API](https://node-postgres.com). |
@@ -21,4 +21,3 @@ // NOTA(RECKER): Conectarse a la DB | ||
chat_id = ctx.from.id; | ||
} | ||
else { | ||
} else if (ctx.chat) { | ||
chat_id = ctx.chat.id; | ||
@@ -25,0 +24,0 @@ } |
36
5219
4
89