Compare commits

...

3 Commits

Author SHA1 Message Date
copilot-swe-agent[bot]
d459403b7c Add clarifying comment for nil session handling
Co-authored-by: hsluoyz <3787410+hsluoyz@users.noreply.github.com>
2026-02-05 07:24:14 +00:00
copilot-swe-agent[bot]
cdeac335bb Fix DeleteSession to handle nil session gracefully
Co-authored-by: hsluoyz <3787410+hsluoyz@users.noreply.github.com>
2026-02-05 07:23:11 +00:00
copilot-swe-agent[bot]
b81b502fbc Initial plan 2026-02-05 07:16:40 +00:00

View File

@@ -175,8 +175,10 @@ func DeleteSession(id, curSessionId string) (bool, error) {
return false, err
}
// If session doesn't exist, return success with no rows affected
// This is a valid state (e.g., when a user has no active session)
if session == nil {
return false, fmt.Errorf("session is nil")
return false, nil
}
if slices.Contains(session.SessionId, curSessionId) {