Skip to content

Commit

Permalink
OwnDndResponse and SnoozeResponse match response JSON
Browse files Browse the repository at this point in the history
Resolves #166
  • Loading branch information
soxtoby committed Aug 18, 2023
1 parent 4fb22bd commit 2f0c110
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions SlackNet/WebApi/Responses/OwnDndResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ namespace SlackNet.WebApi;
public class OwnDndResponse : DndResponse
{
public bool SnoozeEnabled { get; set; }
public int SnoozeEndTime { get; set; }
public int SnoozeEndtime { get; set; }
[JsonIgnore]
public DateTime? SnoozeEnd => SnoozeEndTime.ToDateTime();
public DateTime? SnoozeEnd => SnoozeEndtime.ToDateTime();
public int SnoozeRemaining { get; set; }
public TimeSpan SnoozeRemainingTimeSpan => TimeSpan.FromSeconds(SnoozeRemaining);
public bool SnoozeIsIndefinite { get; set; }
}
5 changes: 3 additions & 2 deletions SlackNet/WebApi/Responses/SnoozeResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ namespace SlackNet.WebApi;
public class SnoozeResponse
{
public bool SnoozeEnabled { get; set; }
public int SnoozeEndTime { get; set; }
public int SnoozeEndtime { get; set; }
[JsonIgnore]
public DateTime? SnoozeEnd => SnoozeEndTime.ToDateTime();
public DateTime? SnoozeEnd => SnoozeEndtime.ToDateTime();
public int SnoozeRemaining { get; set; }
public TimeSpan SnoozeRemainingTimeSpan => TimeSpan.FromSeconds(SnoozeRemaining);
public bool SnoozeIsIndefinite { get; set; }
}

0 comments on commit 2f0c110

Please sign in to comment.