Skip to content

Commit

Permalink
Merge pull request #44 from Amino-NET-Group/patch/fix-current-json-is…
Browse files Browse the repository at this point in the history
…sues

fixed #43
  • Loading branch information
FabioGaming authored Jun 2, 2024
2 parents 06eca13 + c4b2fbe commit 72e8e05
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Amino.NET/Client.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1856,7 +1856,7 @@ public Objects.FromCode get_from_code(string aminoUrl)
var response = client.ExecuteGet(request);
if ((int)response.StatusCode != 200) { throw new Exception(response.Content); }
if (Debug) { Trace.WriteLine(response.Content); }
return System.Text.Json.JsonSerializer.Deserialize<FromCode>(JsonDocument.Parse(response.Content).RootElement.GetRawText());
return System.Text.Json.JsonSerializer.Deserialize<FromCode>(JsonDocument.Parse(response.Content).RootElement.GetProperty("linkInfoV2").GetRawText());
}

/// <summary>
Expand Down Expand Up @@ -1889,7 +1889,7 @@ public Objects.FromCode get_from_id(string objectId, Amino.Types.Object_Types ty
var response = client.ExecutePost(request);
if ((int)response.StatusCode != 200) { throw new Exception(response.Content); }
if (Debug) { Trace.WriteLine(response.Content); }
return System.Text.Json.JsonSerializer.Deserialize<FromCode>(JsonDocument.Parse(response.Content).RootElement.GetRawText());
return System.Text.Json.JsonSerializer.Deserialize<FromCode>(JsonDocument.Parse(response.Content).RootElement.GetProperty("linkInfoV2").GetRawText());
}

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion Amino.NET/Objects/LastChatMessageSummary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ public class LastChatMessageSummary
{
[JsonPropertyName("uid")] public string UserId { get; set; }
[JsonPropertyName("isHidden")] public bool? IsHidden { get; set; }
[JsonPropertyName("mediaType")] public string MediaType { get; set; }
[JsonPropertyName("mediaType")] public int? MediaType { get; set; }
[JsonPropertyName("content")] public string Content { get; set; }
[JsonPropertyName("messageId")] public string MessageId { get; set; }
[JsonPropertyName("createdTime")] public string CreatedTime { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion Amino.NET/Objects/WalletInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class WalletInfo
[JsonPropertyName("adsEnabled")]public bool? AdsEnabled { get; set; }
[JsonPropertyName("adsVideoStats")]public string AdsVideoStats { get; set; }
[JsonPropertyName("adsFlag")]public string AdsFlag { get; set; }
[JsonPropertyName("totalCoins")]public int? TotalCoins { get; set; }
[JsonPropertyName("totalCoins")]public float? TotalCoins { get; set; }
[JsonPropertyName("businessCoinsEnabled")]public bool? BusinessCoinsEnabled { get; set; }
[JsonPropertyName("totalBusinessCoins")]public int? TotalBusinessCoins { get; set; }
[JsonPropertyName("totalBusinessCoinsFloat")]public float? TotalBusinessCoinsFloat { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion Amino.NET/SubClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -873,7 +873,7 @@ public Task send_activity_time()
int optInAdsFlags = 2147483647;
int tzf = helpers.TzFilter();
data.Add("userActiveTimeChunkList", timeData);
data.Add("OptInAdsFlags", optInAdsFlags);
data.Add("optInAdsFlags", optInAdsFlags);
data.Add("timestamp", (long)(DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1))).TotalMilliseconds);
data.Add("timezone", tzf);

Expand Down

0 comments on commit 72e8e05

Please sign in to comment.