Skip to content

Commit

Permalink
Bugfix for GetStoryMediaViewersAsync
Browse files Browse the repository at this point in the history
  • Loading branch information
ramtinak committed Feb 25, 2019
1 parent 9a6b7ec commit 278ff06
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ public class InstaReelStoryMediaViewersResponse
[JsonProperty("screenshotter_user_ids")]
public object[] ScreenshotterUserIds { get; set; }
[JsonProperty("total_screenshot_count")]
public int TotalScreenshotCount { get; set; }
public double? TotalScreenshotCount { get; set; }
[JsonProperty("total_viewer_count")]
public int TotalViewerCount { get; set; }
public double? TotalViewerCount { get; set; }
[JsonProperty("updated_media")]
public InstaStoryItemResponse UpdatedMedia { get; set; }
[JsonProperty("user_count")]
public int UserCount { get; set; }
public double? UserCount { get; set; }
[JsonProperty("users")]
public List<InstaUserShortResponse> Users { get; set; }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ public InstaReelStoryMediaViewers Convert()
var reelViewers = new InstaReelStoryMediaViewers
{
NextMaxId = SourceObject.NextMaxId,
TotalScreenshotCount = SourceObject.TotalScreenshotCount,
TotalViewerCount = SourceObject.TotalViewerCount,
UserCount = SourceObject.UserCount
TotalScreenshotCount = (int)(SourceObject.TotalScreenshotCount ?? 0),
TotalViewerCount = (int)(SourceObject.TotalViewerCount ?? 0),
UserCount = (int)(SourceObject.UserCount ?? 0)
};

if (SourceObject.Users?.Count > 0)
Expand Down

0 comments on commit 278ff06

Please sign in to comment.