Skip to content

Commit

Permalink
fix: default empty session file name for string session constructors
Browse files Browse the repository at this point in the history
  • Loading branch information
celestix committed Apr 30, 2024
1 parent d12907c commit 35f1f2d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sessionMaker/sessionMaker.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ func NewSessionStorage(ctx context.Context, sessionType SessionConstructor, inMe
peerStorage: peerStorage,
}, nil
}
if name.(sessionNameString) == "" {
name = sessionNameString("gotgproto")
}
peerStorage := storage.NewPeerStorage(sqlite.Open(fmt.Sprintf("%s.session", name)), inMemory)
if inMemory {
s := session.StorageMemory{}
Expand Down

0 comments on commit 35f1f2d

Please sign in to comment.