Skip to content

Commit 33034cd

Browse files
api: switch from /ei/first_contact to /ei/bot_first_contact
/ei/first_contact is gone (only the /ei/first_contact_secure version remains). Helpfully, Kev introduced a /ei/bot_first_contact just for bots without MAC.
1 parent 9ffcf59 commit 33034cd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

api/api.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@ func RequestFirstContactRawPayloadWithContext(ctx context.Context, playerId stri
1010
req := &ei.EggIncFirstContactRequest{
1111
Rinfo: NewBasicRequestInfo(playerId),
1212
EiUserId: &playerId,
13+
DeviceId: sptr("EggLedger"), // This is actually bot_name for /ei/bot_first_contact.
1314
ClientVersion: u32ptr(ClientVersion),
1415
Platform: Platform.Enum(),
1516
}
16-
payload, err := RequestRawPayloadWithContext(ctx, "/ei/first_contact", req)
17+
payload, err := RequestRawPayloadWithContext(ctx, "/ei/bot_first_contact", req)
1718
if err != nil {
1819
return nil, err
1920
}
@@ -22,7 +23,7 @@ func RequestFirstContactRawPayloadWithContext(ctx context.Context, playerId stri
2223

2324
func DecodeFirstContactPayload(payload []byte) (*ei.EggIncFirstContactResponse, error) {
2425
msg := &ei.EggIncFirstContactResponse{}
25-
err := DecodeAPIResponse(_apiPrefix+"/ei/first_contact", payload, msg, true)
26+
err := DecodeAPIResponse(_apiPrefix+"/ei/bot_first_contact", payload, msg, false)
2627
if err != nil {
2728
return nil, err
2829
}

0 commit comments

Comments
 (0)