Skip to content

Commit

Permalink
fix: invalid telegram session store.
Browse files Browse the repository at this point in the history
  • Loading branch information
syhily committed Jan 17, 2024
1 parent 3e43373 commit 68954bf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/fetcher/telegram.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func newTelegramService(config *Config) (service, error) {

// Change the process file name.
config.processFile = strings.ReplaceAll(channelID, "/", "_") + ".db"
if len(config.Keywords) == 0 {
if len(config.Keywords) != 0 {
config.processFile = strconv.FormatInt(time.Now().Unix(), 10) + config.processFile
}

Expand Down
2 changes: 1 addition & 1 deletion internal/file/writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func (c *creator) NewWriter(id, total int64, name, subPath string, format Format
// Escape the file name for avoiding the illegal characters.
// Ref: https://en.wikipedia.org/wiki/Filename#Reserved_characters_and_words
filename = escape(filename)

// Create the download path.
downloadPath := c.downloadPath
if subPath != "" {
Expand Down

0 comments on commit 68954bf

Please sign in to comment.