diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpMessage/MiniProgramPageMessageEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpMessage/MiniProgramPageMessageEvent.cs index dc57eb79..2fb952bb 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpMessage/MiniProgramPageMessageEvent.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpMessage/MiniProgramPageMessageEvent.cs @@ -2,7 +2,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Events { /// /// 表示 MINIPROGRAMPAGE 事件的数据。 - /// REF: https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Receiving_standard_messages.html#%E6%96%87%E6%9C%AC%E6%B6%88%E6%81%AF + /// REF: https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/customer-message/receive.html /// public class MiniProgramPageMessageEvent : WechatApiEvent, WechatApiEvent.Serialization.IJsonSerializable, WechatApiEvent.Serialization.IXmlSerializable { diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpPush/UserEnterTempSessionEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpPush/UserEnterTempSessionEvent.cs new file mode 100644 index 00000000..0cf87b6b --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpPush/UserEnterTempSessionEvent.cs @@ -0,0 +1,17 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 EVENT.user_enter_tempsession 事件的数据。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/customer-message/receive.html + /// + public class UserEnterTempSessionEvent : WechatApiEvent, WechatApiEvent.Serialization.IJsonSerializable, WechatApiEvent.Serialization.IXmlSerializable + { + /// + /// 获取或设置会话来源。 + /// + [Newtonsoft.Json.JsonProperty("SessionFrom")] + [System.Text.Json.Serialization.JsonPropertyName("SessionFrom")] + [System.Xml.Serialization.XmlElement("SessionFrom")] + public string SessionFrom { get; set; } = default!; + } +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/EventSamples/MpPush/UserEnterTempSessionEvent.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/EventSamples/MpPush/UserEnterTempSessionEvent.json new file mode 100644 index 00000000..fe083639 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/EventSamples/MpPush/UserEnterTempSessionEvent.json @@ -0,0 +1,8 @@ +{ + "ToUserName": "toUser", + "FromUserName": "fromUser", + "CreateTime": 1482048670, + "MsgType": "event", + "Event": "user_enter_tempsession", + "SessionFrom": "sessionFrom" +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/EventSamples/MpPush/UserEnterTempSessionEvent.xml b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/EventSamples/MpPush/UserEnterTempSessionEvent.xml new file mode 100644 index 00000000..981c76a4 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/EventSamples/MpPush/UserEnterTempSessionEvent.xml @@ -0,0 +1,8 @@ + + + + 1482048670 + + + +