Browse Source

#1494

fix
tags/v1.22.2.2^2
Gitea 4 years ago
parent
commit
cf4be7e4b2
2 changed files with 4 additions and 2 deletions
  1. +3
    -1
      modules/auth/wechat/event_handle.go
  2. +1
    -1
      routers/authentication/wechat_event.go

+ 3
- 1
modules/auth/wechat/event_handle.go View File

@@ -4,6 +4,7 @@ import (
"code.gitea.io/gitea/modules/redis/redis_client"
"code.gitea.io/gitea/modules/redis/redis_key"
"encoding/json"
"encoding/xml"
"strings"
"time"
)
@@ -29,7 +30,8 @@ type WechatEvent struct {
Ticket string
}

type Xml struct {
type EventReply struct {
XMLName xml.Name `xml:"xml"`
ToUserName string
FromUserName string
CreateTime int64


+ 1
- 1
routers/authentication/wechat_event.go View File

@@ -25,7 +25,7 @@ func AcceptWechatEvent(ctx *context.Context) {
log.Info("reply str is empty")
return
}
reply := &wechat.Xml{
reply := &wechat.EventReply{
ToUserName: we.FromUserName,
FromUserName: we.ToUserName,
CreateTime: time.Now().Unix(),


Loading…
Cancel
Save