We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 78af498 commit 964ec24Copy full SHA for 964ec24
1 file changed
SlackNet/Blocks/RichTextBlock.cs
@@ -1,4 +1,5 @@
1
-using System.Collections.Generic;
+using System;
2
+using System.Collections.Generic;
3
using Newtonsoft.Json;
4
5
namespace SlackNet.Blocks;
@@ -93,7 +94,15 @@ public class RichTextUserGroup() : RichTextSectionElement("usergroup")
93
94
public class RichTextDate() : RichTextSectionElement("date")
95
{
96
public string Text { get; set; }
- public string Timestamp { get; set; }
97
+ public long Timestamp { get; set; }
98
+
99
+ [JsonIgnore]
100
+ public DateTime? Date
101
+ {
102
+ get => Timestamp.ToDateTime();
103
+ set => Timestamp = value?.ToTimestampNumber() ?? 0;
104
+ }
105
106
/// <summary>
107
/// See https://api.slack.com/reference/surfaces/formatting#date-formatting for more information.
108
/// </summary>
0 commit comments