Add Line webhook controller with signature verification and dispatch
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
namespace ROLAC.API.DTOs.Notifications;
|
||||
|
||||
/// <summary>Top-level Line webhook payload (deserialized case-insensitively).</summary>
|
||||
public sealed class LineWebhookPayload
|
||||
{
|
||||
public List<LineWebhookEvent>? Events { get; set; }
|
||||
}
|
||||
|
||||
public sealed class LineWebhookEvent
|
||||
{
|
||||
public string? Type { get; set; } // follow | message | join | leave | ...
|
||||
public string? ReplyToken { get; set; }
|
||||
public LineWebhookSource? Source { get; set; }
|
||||
public LineWebhookMessage? Message { get; set; }
|
||||
}
|
||||
|
||||
public sealed class LineWebhookSource
|
||||
{
|
||||
public string? Type { get; set; } // user | group | room
|
||||
public string? UserId { get; set; }
|
||||
public string? GroupId { get; set; }
|
||||
}
|
||||
|
||||
public sealed class LineWebhookMessage
|
||||
{
|
||||
public string? Type { get; set; } // text | image | ...
|
||||
public string? Text { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user