Skip to content

Commit

Permalink
feat: usage of timed req
Browse files Browse the repository at this point in the history
  • Loading branch information
arifBurakDemiray committed Sep 27, 2023
1 parent b18f99f commit 36fb170
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ static Request addRequired(InternalConfig config, Request request) {
//if nothing was in the request, no need to add these mandatory fields
return request;
}

//check if it has the device ID
if (!request.params.has(Params.PARAM_DEVICE_ID)) {
if (config.getDeviceId() == null) {
Expand Down Expand Up @@ -251,10 +252,7 @@ public static Future<Boolean> pushAsync(final CtxCore ctx, final Request request
return null;
}

request.params.add("timestamp", Device.dev.uniqueTimestamp())
.add("tz", Device.dev.getTimezoneOffset())
.add("hour", Device.dev.currentHour())
.add("dow", Device.dev.currentDayOfWeek());
addRequiredTimeParams(request);

return Storage.pushAsync(ctx, request, param -> {
SDKCore.instance.onRequest(ctx, request);
Expand Down

0 comments on commit 36fb170

Please sign in to comment.