Skip to content

Commit

Permalink
Fixed Bug of OidbSvcTrpcTcp that does not indicates error correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
Linwenxuan04 committed Aug 15, 2023
1 parent c5a30d3 commit 9482801
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ internal class OidbSvcTrpcTcpResponse<T>

[ProtoMember(2)] public uint SubCommand { get; set; }

[ProtoMember(3)] public uint Field3 { get; set; }
[ProtoMember(3)] public uint ErrorCode { get; set; }

[ProtoMember(4)] public T Body { get; set; }

Expand Down
2 changes: 1 addition & 1 deletion Lagrange.Core/Core/Service/Action/GroupSetAdminService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ protected override bool Parse(SsoPacket input, BotKeystore keystore, BotAppInfo
var payload = input.Payload.ReadBytes(BinaryPacket.Prefix.Uint32 | BinaryPacket.Prefix.WithPrefix);
var packet = Serializer.Deserialize<OidbSvcTrpcTcpResponse<OidbSvcTrpcTcp0x1096_1Response>>(payload.AsSpan());

output = GroupSetAdminEvent.Result(packet.Body.Success == "success" ? 0 : -1);
output = GroupSetAdminEvent.Result((int)packet.ErrorCode);
extraEvents = null;
return true;
}
Expand Down
2 changes: 1 addition & 1 deletion Lagrange.Core/Core/Service/System/FetchCookieService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ protected override bool Parse(SsoPacket input, BotKeystore keystore, BotAppInfo
var packet = Serializer.Deserialize<OidbSvcTrpcTcpResponse<OidbSvcTrpcTcp0x102A_0Response>>(payload.AsSpan());
var cookies = packet.Body.Urls.Select(x => Encoding.UTF8.GetString(x.Value)).ToList();

output = FetchCookieEvent.Result((int)packet.Field3, cookies);
output = FetchCookieEvent.Result((int)packet.ErrorCode, cookies);
extraEvents = null;
return true;
}
Expand Down

0 comments on commit 9482801

Please sign in to comment.