mirror of
https://github.com/memohai/Memoh.git
synced 2026-04-27 07:16:19 +09:00
f376a2abe3
Unify webhook handling across channel adapters and add the WeChat Official Account channel so inbound routing and replies work without platform-specific handlers. Add adapter-scoped proxy support and stable config field ordering so restricted network environments can deliver WeChat and Telegram messages reliably.
37 lines
1.1 KiB
Go
37 lines
1.1 KiB
Go
package wechatoa
|
|
|
|
import "encoding/xml"
|
|
|
|
type wechatEnvelope struct {
|
|
XMLName xml.Name `xml:"xml"`
|
|
ToUserName string `xml:"ToUserName"`
|
|
FromUserName string `xml:"FromUserName"`
|
|
CreateTime int64 `xml:"CreateTime"`
|
|
MsgType string `xml:"MsgType"`
|
|
MsgID string `xml:"MsgId"`
|
|
Content string `xml:"Content"`
|
|
MediaID string `xml:"MediaId"`
|
|
PicURL string `xml:"PicUrl"`
|
|
Format string `xml:"Format"`
|
|
ThumbMediaID string `xml:"ThumbMediaId"`
|
|
LocationX string `xml:"Location_X"`
|
|
LocationY string `xml:"Location_Y"`
|
|
Scale string `xml:"Scale"`
|
|
Label string `xml:"Label"`
|
|
Title string `xml:"Title"`
|
|
Description string `xml:"Description"`
|
|
URL string `xml:"Url"`
|
|
Event string `xml:"Event"`
|
|
EventKey string `xml:"EventKey"`
|
|
Ticket string `xml:"Ticket"`
|
|
Latitude string `xml:"Latitude"`
|
|
Longitude string `xml:"Longitude"`
|
|
Precision string `xml:"Precision"`
|
|
Encrypt string `xml:"Encrypt"`
|
|
}
|
|
|
|
type encryptedEnvelope struct {
|
|
XMLName xml.Name `xml:"xml"`
|
|
Encrypt string `xml:"Encrypt"`
|
|
}
|