Skip to content

Commit

Permalink
修复订阅云文档事件头
Browse files Browse the repository at this point in the history
  • Loading branch information
Vicente.Yu committed Sep 13, 2024
1 parent a876041 commit b443cc4
Showing 1 changed file with 30 additions and 6 deletions.
36 changes: 30 additions & 6 deletions src/Services/ResourceEventV2Dto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,39 @@ namespace FeishuNetSdk.Services
public record ResourceEventV2Dto<T> : EventV2Dto<T> where T : EventBodyDto
{
/// <summary>
/// 订阅的云文档 token
/// 事件唯一Id
/// </summary>
[JsonPropertyName("resource_id")]
public string? ResourceId { get; set; }
[JsonPropertyName("event_id")]
public override string EventId => Header.EventId;

/// <summary>
/// 订阅的云文档 token
/// 事件 Token,即Verification Token。用于验证来自于同一个应用
/// </summary>
[JsonPropertyName("user_list")]
public UserIdSuffix[]? UserList { get; set; }
[JsonPropertyName("token")]
public override string Token => Header.Token;

/// <summary>
/// 事件头
/// </summary>
[JsonPropertyName("header")]
public new HeaderV2Suffix Header { get; set; } = new();

/// <summary>
/// 事件头
/// </summary>
public record HeaderV2Suffix : HeaderSuffix
{
/// <summary>
/// 订阅的云文档 token
/// </summary>
[JsonPropertyName("resource_id")]
public string? ResourceId { get; set; }

/// <summary>
/// 订阅的云文档 token
/// </summary>
[JsonPropertyName("user_list")]
public UserIdSuffix[]? UserList { get; set; }
}
}
}

0 comments on commit b443cc4

Please sign in to comment.