diff --git a/avatar.go b/avatar.go index ecd1aa1..f97c725 100644 --- a/avatar.go +++ b/avatar.go @@ -48,7 +48,7 @@ func (u *AudonUser) GetIndicator(ctx context.Context, fnew []byte) ([]byte, erro return nil, err } if u.AvatarFile != "" { - os.Remove(u.getAvatarImagePath(u.AvatarFile)) + // os.Remove(u.getAvatarImagePath(u.AvatarFile)) } isAvatarNew = true } diff --git a/user.go b/user.go index 0d8a43f..73d1e66 100644 --- a/user.go +++ b/user.go @@ -3,7 +3,6 @@ package main import ( "context" "net/http" - "os" "github.com/labstack/echo/v4" "go.mongodb.org/mongo-driver/bson" @@ -41,7 +40,7 @@ func (a *AudonUser) InLivekit(ctx context.Context) (bool, error) { } func (a *AudonUser) ClearUserAvatar(ctx context.Context) error { - os.Remove(a.getAvatarImagePath(a.AvatarFile)) + // os.Remove(a.getAvatarImagePath(a.AvatarFile)) coll := mainDB.Collection(COLLECTION_USER) _, err := coll.UpdateOne(ctx, bson.D{{Key: "audon_id", Value: a.AudonID}}, diff --git a/webhooks.go b/webhooks.go index 8d15dd3..1316ec8 100644 --- a/webhooks.go +++ b/webhooks.go @@ -4,7 +4,6 @@ import ( "fmt" "log" "net/http" - "os" "strings" "time" @@ -69,7 +68,7 @@ func livekitWebhookHandler(c echo.Context) error { <-countdown.C webhookTimerCache.Delete(audonID) - ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + ctx, cancel := context.WithTimeout(context.Background(), 20*time.Second) defer cancel() // ctx := context.TODO() @@ -90,7 +89,7 @@ func livekitWebhookHandler(c echo.Context) error { c.Logger().Warn(err) } user.ClearUserAvatar(ctx) - os.Remove(avatar) + // os.Remove(avatar) } else if err != nil { c.Logger().Error(err) return echo.NewHTTPError(http.StatusInternalServerError)