-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3096 from IcedMango/master
企微回调: 移除不正确的通用模板卡片事件; 增加通用模板卡片事件推送; 增加通用模板卡片右上角菜单事件推送
- Loading branch information
Showing
7 changed files
with
215 additions
and
63 deletions.
There are no files selected for viewing
33 changes: 0 additions & 33 deletions
33
....Work/Senparc.Weixin.Work/Entities/Request/Event/RequestMessageEvent_TemplateCardClick.cs
This file was deleted.
Oops, something went wrong.
79 changes: 79 additions & 0 deletions
79
....Work/Senparc.Weixin.Work/Entities/Request/Event/RequestMessageEvent_TemplateCardEvent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
/*---------------------------------------------------------------- | ||
Copyright (C) 2024 Senparc | ||
文件名:RequestMessageEvent_TemplateCardEvent.cs | ||
文件功能描述:企业微信-模板卡片事件推送 | ||
创建标识:IcedMango - 20241114 | ||
----------------------------------------------------------------*/ | ||
|
||
using System.Collections.Generic; | ||
using System.Xml.Serialization; | ||
|
||
namespace Senparc.Weixin.Work.Entities | ||
{ | ||
/// <summary> | ||
/// 企业微信-模板卡片事件推送 | ||
/// </summary> | ||
public class RequestMessageEvent_TemplateCardEvent : RequestMessageEventBase, IRequestMessageEventBase, IRequestMessageEventKey | ||
{ | ||
/// <summary> | ||
/// 事件类型(template_card_event,点击模板卡片按钮) | ||
/// </summary> | ||
public override Event Event => Event.TEMPLATE_CARD_EVENT; | ||
|
||
/// <summary> | ||
/// 与发送模板卡片消息时指定的按钮btn:key值相同 | ||
/// </summary> | ||
public string EventKey { get; set; } | ||
|
||
/// <summary> | ||
/// 与发送模板卡片消息时指定的task_id相同 | ||
/// </summary> | ||
public string TaskId { get; set; } | ||
|
||
/// <summary> | ||
/// 通用模板卡片的类型 | ||
/// </summary> | ||
public TemplateCard_CardTypeEnum CardType { get; set; } | ||
|
||
/// <summary> | ||
/// 用于调用更新卡片接口的ResponseCode,72小时内有效,且只能使用一次 | ||
/// </summary> | ||
public string ResponseCode { get; set; } | ||
|
||
/// <summary> | ||
/// | ||
/// </summary> | ||
[XmlArray("SelectedItems")] | ||
[XmlArrayItem("SelectedItem")] | ||
public List<TemplateCard_SelectedItem> SelectedItems { get; set; } | ||
} | ||
|
||
/// <summary> | ||
/// 通用模板卡片的类型 | ||
/// </summary> | ||
public enum TemplateCard_CardTypeEnum | ||
{ | ||
text_notice, | ||
news_notice, | ||
button_interaction, | ||
vote_interaction, | ||
multiple_interaction | ||
} | ||
|
||
public class TemplateCard_SelectedItem | ||
{ | ||
/// <summary> | ||
/// 问题的key值 | ||
/// </summary> | ||
[XmlElement("QuestionKey")] | ||
public string QuestionKey { get; set; } | ||
|
||
[XmlArray("OptionIds")] | ||
[XmlArrayItem("OptionId")] | ||
public List<string> OptionIds { get; set; } | ||
} | ||
} |
47 changes: 47 additions & 0 deletions
47
...k/Senparc.Weixin.Work/Entities/Request/Event/RequestMessageEvent_TemplateCardMenuEvent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/*---------------------------------------------------------------- | ||
Copyright (C) 2024 Senparc | ||
文件名:RequestMessageEvent_TemplateCardMenuEvent.cs | ||
文件功能描述:通用模板卡片右上角菜单事件推送 | ||
创建标识:IcedMango - 20241114 | ||
----------------------------------------------------------------*/ | ||
|
||
using System.Collections.Generic; | ||
using System.Xml.Serialization; | ||
|
||
namespace Senparc.Weixin.Work.Entities | ||
{ | ||
/// <summary> | ||
/// 企业微信-模板卡片事件推送 | ||
/// </summary> | ||
public class RequestMessageEvent_TemplateCardMenuEvent : RequestMessageEventBase, IRequestMessageEventBase, IRequestMessageEventKey | ||
{ | ||
/// <summary> | ||
/// 事件类型(template_card_menu_event,通用模板卡片右上角菜单事件推送) | ||
/// </summary> | ||
public override Event Event => Event.TEMPLATE_CARD_MENU_EVENT; | ||
|
||
/// <summary> | ||
/// 与发送模板卡片消息时指定的按钮btn:key值相同 | ||
/// </summary> | ||
public string EventKey { get; set; } | ||
|
||
/// <summary> | ||
/// 与发送模板卡片消息时指定的task_id相同 | ||
/// </summary> | ||
public string TaskId { get; set; } | ||
|
||
/// <summary> | ||
/// 通用模板卡片的类型 | ||
/// </summary> | ||
public TemplateCard_CardTypeEnum CardType { get; set; } | ||
|
||
/// <summary> | ||
/// 用于调用更新卡片接口的ResponseCode,72小时内有效,且只能使用一次 | ||
/// </summary> | ||
public string ResponseCode { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.