Enha: export chat to export dir

This commit is contained in:
Grail Finder
2025-08-07 06:43:02 +03:00
parent 39e8f557cf
commit c58f251745
4 changed files with 12 additions and 8 deletions

View File

@@ -1,12 +1,13 @@
package main
import (
"gf-lt/models"
"encoding/json"
"errors"
"fmt"
"gf-lt/models"
"os"
"os/exec"
"path"
"path/filepath"
"strings"
"time"
@@ -32,7 +33,8 @@ func exportChat() error {
if err != nil {
return err
}
return os.WriteFile(activeChatName+".json", data, 0666)
fp := path.Join(exportDir, activeChatName+".json")
return os.WriteFile(fp, data, 0666)
}
func importChat(filename string) error {