From 2e72d8377e915866af201fd0657b2dddead23db9 Mon Sep 17 00:00:00 2001 From: ChronosX88 Date: Thu, 25 Mar 2021 14:29:30 +0300 Subject: [PATCH] Add JsonProperty to Sync Request/Response model --- .../ChatSubsystem/Storage/Models/SyncRequest.cs | 8 ++++++++ .../ChatSubsystem/Storage/Models/SyncResponse.cs | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/src/ZirconiumPlugins/ChatSubsystem/Storage/Models/SyncRequest.cs b/src/ZirconiumPlugins/ChatSubsystem/Storage/Models/SyncRequest.cs index 3ce009b..378a293 100644 --- a/src/ZirconiumPlugins/ChatSubsystem/Storage/Models/SyncRequest.cs +++ b/src/ZirconiumPlugins/ChatSubsystem/Storage/Models/SyncRequest.cs @@ -1,12 +1,20 @@ +using Newtonsoft.Json; using Zirconium.Core.Models; namespace ChatSubsystem.Storage.Models { public class SyncRequest { + [JsonProperty("since")] public EntityID Since { get; set; } + + [JsonProperty("limit")] public int Limit { get; set; } + + [JsonProperty("chatID")] public EntityID ChatID { get; set; } + + [JsonProperty("syncDirection")] public string SyncDirection { get; set; } } } \ No newline at end of file diff --git a/src/ZirconiumPlugins/ChatSubsystem/Storage/Models/SyncResponse.cs b/src/ZirconiumPlugins/ChatSubsystem/Storage/Models/SyncResponse.cs index 4c2eeec..fc5e60c 100644 --- a/src/ZirconiumPlugins/ChatSubsystem/Storage/Models/SyncResponse.cs +++ b/src/ZirconiumPlugins/ChatSubsystem/Storage/Models/SyncResponse.cs @@ -1,12 +1,18 @@ using System.Collections.Generic; +using Newtonsoft.Json; using Zirconium.Core.Models; namespace ChatSubsystem.Storage.Models { public class SyncResponse { + [JsonProperty("nextBatch")] public EntityID NextBatch { get; set; } + + [JsonProperty("mentionedChats")] public IList MentionedChats { get; set; } + + [JsonProperty("events")] public IList Events { get; set; } } } \ No newline at end of file