Skip to content

Commit

Permalink
Update dependencies and proper GetInbox.
Browse files Browse the repository at this point in the history
  • Loading branch information
AeonLucid committed Jul 12, 2017
1 parent c02ddce commit 306b675
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="NLog" Version="5.0.0-beta08" />
<PackageReference Include="NLog" Version="5.0.0-beta09" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="NLog" Version="5.0.0-beta08" />
<PackageReference Include="NLog" Version="5.0.0-beta09" />
</ItemGroup>

<ItemGroup>
Expand Down
25 changes: 12 additions & 13 deletions POGOLib.Official/Net/RpcClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ public class RpcClient : IDisposable
RequestType.GetHatchedEggs,
RequestType.GetInventory,
RequestType.CheckAwardedBadges,
RequestType.DownloadSettings
RequestType.DownloadSettings,
RequestType.GetInbox
};

private readonly ConcurrentQueue<RequestEnvelope> _rpcQueue = new ConcurrentQueue<RequestEnvelope>();
Expand Down Expand Up @@ -334,7 +335,8 @@ private IEnumerable<Request> GetDefaultRequests()
},
new Request
{
RequestType = RequestType.GetHatchedEggs
RequestType = RequestType.GetHatchedEggs,
RequestMessage = new GetHatchedEggsMessage().ToByteString()
},
new Request
{
Expand All @@ -346,7 +348,8 @@ private IEnumerable<Request> GetDefaultRequests()
},
new Request
{
RequestType = RequestType.CheckAwardedBadges
RequestType = RequestType.CheckAwardedBadges,
RequestMessage = new CheckAwardedBadgesMessage().ToByteString()
}
};

Expand All @@ -368,6 +371,12 @@ private IEnumerable<Request> GetDefaultRequests()
}.ToByteString()
});
}

request.Add(new Request
{
RequestType = RequestType.GetInbox,
RequestMessage = ByteString.Empty // TODO: Figure out parameters for "GetInboxMessage".
});

//If Incense is active we add this:
//request.Add(new Request
Expand Down Expand Up @@ -432,16 +441,6 @@ public async Task<RequestEnvelope> GetRequestEnvelopeAsync(IEnumerable<Request>
requestEnvelope.AuthTicket = _session.AccessToken.AuthTicket;
}

if (requestEnvelope.Requests.Count > 0 &&
requestEnvelope.Requests[0].RequestType == RequestType.GetMapObjects)
{
requestEnvelope.Requests.Add(new Request
{
RequestType = RequestType.GetInbox,
RequestMessage = ByteString.Empty
});
}

requestEnvelope.PlatformRequests.Add(await _rpcEncryption.GenerateSignatureAsync(requestEnvelope));

if (requestEnvelope.Requests.Count > 0 && (
Expand Down
2 changes: 1 addition & 1 deletion POGOLib.Official/POGOLib.Official.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

<ItemGroup>
<PackageReference Include="GeoCoordinate.NetStandard1" Version="1.0.1" />
<PackageReference Include="POGOProtos.NetStandard1" Version="2.11.0-beta" />
<PackageReference Include="POGOProtos.NetStandard1" Version="2.11.0" />
<PackageReference Include="Google.Protobuf" Version="3.3.0" />
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
<PackageReference Include="S2Geometry" Version="1.0.3" />
Expand Down

0 comments on commit 306b675

Please sign in to comment.