feat: added following system using cookies

This commit is contained in:
2025-11-19 18:09:37 -03:00
parent 4e05923cd8
commit 2fd13de8e1
9 changed files with 56 additions and 12 deletions

View File

@@ -1,5 +1,5 @@
# SPDX-License-Identifier: AGPL-3.0-only
import tables
import tables, strutils, sequtils
import types, prefs_impl
from config import get
from parsecfg import nil
@@ -13,6 +13,8 @@ proc updateDefaultPrefs*(cfg: parsecfg.Config) =
proc getPrefs*(cookies: Table[string, string]): Prefs =
result = defaultPrefs
if "nitter_following" in cookies:
result.following = cookies["nitter_following"].split(',').filterIt(it.len > 0)
genCookiePrefs(cookies)
template getPref*(cookies: Table[string, string], pref): untyped =