Fix for client not reconnecting when idlesince is set.
Created by: Neuheit
Summary
This PR fixes a bug which causes an exception to be thrown when reconnecting with an idlesince DateTime. Resolves #547 (closed).
Details
This was actually caused by a PR I did a while ago for a separate patch for reapplying statuses. Previously, I used the Utilities.GetDateTimeOffset()
method, which calculated the offset from seconds, which is what threw an ArgumentOutOfRangeException
. The reconnection now uses Utilities.GetDateTimeOffsetFromMilliseconds()
.
There is also a fix for the InviteDeleted event which wouldn't set the returned invites revoked status to true, even though an invite fired from that event would always be revoked.
Notes
The only weird thing about reconnecting will be that the new idlesince timestamp will be in Utc regardless if the original timestamp was based off the system clock, although I don't think this will be an issue.