1
0
mirror of https://github.com/zedeus/nitter.git synced 2025-12-06 03:55:36 -05:00

Add optional cookie session fields

This commit is contained in:
Zed
2025-11-16 05:03:01 +01:00
parent 3768762fca
commit 6fe850b2c6
2 changed files with 4 additions and 1 deletions

View File

@@ -17,9 +17,10 @@ proc parseSession*(raw: string): Session =
oauthSecret: session.oauthTokenSecret oauthSecret: session.oauthTokenSecret
) )
of "cookie": of "cookie":
let id = if session.id.len > 0: parseBiggestInt(session.id) else: 0
result = Session( result = Session(
kind: SessionKind.cookie, kind: SessionKind.cookie,
id: 999, id: id,
authToken: session.authToken, authToken: session.authToken,
ct0: session.ct0 ct0: session.ct0
) )

View File

@@ -1,6 +1,8 @@
type type
RawSession* = object RawSession* = object
kind*: string kind*: string
username*: string
id*: string
oauthToken*: string oauthToken*: string
oauthTokenSecret*: string oauthTokenSecret*: string
authToken*: string authToken*: string