mirror of
https://github.com/krau/SaveAny-Bot.git
synced 2026-05-20 15:49:36 +08:00
feat: refactor database dialect handling and add stubs for unsupported features
This commit is contained in:
@@ -17,7 +17,6 @@ import (
|
||||
"github.com/krau/SaveAny-Bot/common/utils/tgutil"
|
||||
"github.com/krau/SaveAny-Bot/config"
|
||||
"github.com/krau/SaveAny-Bot/database"
|
||||
"github.com/ncruces/go-sqlite3/gormlite"
|
||||
)
|
||||
|
||||
var uc *gotgproto.Client
|
||||
@@ -64,7 +63,7 @@ func Login(ctx context.Context) (*gotgproto.Client, error) {
|
||||
config.C().Telegram.AppHash,
|
||||
gotgproto.ClientTypePhone(""),
|
||||
&gotgproto.ClientOpts{
|
||||
Session: sessionMaker.SqlSession(gormlite.Open(config.C().Telegram.Userbot.Session)),
|
||||
Session: sessionMaker.SqlSession(database.GetDialect(config.C().Telegram.Userbot.Session)),
|
||||
AuthConversator: &terminalAuthConversator{},
|
||||
Context: ctx,
|
||||
DisableCopyright: true,
|
||||
|
||||
Reference in New Issue
Block a user