Closed IsaaacD closed 2 years ago
If I change UserSubreddit.cs line 32 to have a nullable boolean it works
public bool? UserIsMuted { get; set; }
For those that need it working now and don't really now how:
Things/User/UserSubreddit.cs
public bool UserIsMuted
to public bool? UserIsMuted
(i.e. make it nullable)Reddit.NET\bin\Debug
)C:\Users\$USER\AppData\Roaming\NuGet\
<add key="Local Source" value="Path\To\Folder" />
It might be worth considering making all the types nullable incase something like this pops up for other properties
@IsaaacD Yeah I've gone back and forth on this one. I really want the properties to map to their API counterparts as closely as possible (especially in the Models/Things layer). So if a user sees a property that's nullable, they'll know at a glance that the API can return null for that field.
The main problem I see with making everything nullable is that it makes the userland code needlessly clunky. I mean, to have hundreds of nullable types just because one of them might be changed to nullable every couple years just doesn't seem to pass the cost-benefit test for me.
The real issue here isn't the nullables. The issue is with me and my apparent slowness to respond to these kinds of issues as of late. I'm hoping this will get better as my schedule gets a little more manageable. SLA on core-breaking hotfixes should not be measured in weeks, so that one's on me.
PR #150 has been merged into develop.
@sirkris yea that makes sense, I've only been using the project for a couple weeks and didn't put much thought into it in except that having Reddit shift their API responses could be messy. That makes sense to keep the API clean and intuitive, I'm not sure how often Reddit plans to make such changes.
I went ahead and put out a hotfix release. If you update to version 1.5.2 in NuGet, the library should work again.
When I try to access RedditClient.Account.Me I get the following issue Is this something that has changed? I was using the Nuget package and it stopped working today, I've been playing with it for a few weeks without issue.
Please advise
The error reads: 'Error converting value {null} to type 'System.Boolean'. Path 'subreddit.user_is_muted', line 1, position 477.'