Skip to content

Commit

Permalink
[Fix] 🐛 Save Anonymous Cookie Only
Browse files Browse the repository at this point in the history
  • Loading branch information
Harry-zklcdc committed Jan 31, 2024
1 parent 1ca6887 commit 5636e3e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/v1/chat.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ func ChatHandler(w http.ResponseWriter, r *http.Request) {
w.Write([]byte("\n\n"))
flusher.Flush()

if tmp == "User needs to solve CAPTCHA to continue." && common.BypassServer != "" {
if tmp == "User needs to solve CAPTCHA to continue." && common.BypassServer != "" && r.Header.Get("Cookie") == "" {
go func(cookie string) {
t, _ := getCookie(cookie, chat.GetChatHub().GetConversationId(), hex.NewUUID())
if t != "" {
Expand Down Expand Up @@ -178,7 +178,7 @@ func ChatHandler(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusOK)
w.Write(resData)

if text == "User needs to solve CAPTCHA to continue." && common.BypassServer != "" {
if text == "User needs to solve CAPTCHA to continue." && common.BypassServer != "" && r.Header.Get("Cookie") == "" {
go func(cookie string) {
t, _ := getCookie(cookie, chat.GetChatHub().GetConversationId(), hex.NewUUID())
if t != "" {
Expand Down

0 comments on commit 5636e3e

Please sign in to comment.