Skip to content

Commit 4ef844f

Browse files
Updated from pipeline, Version : 23.7.0
1 parent ac99e42 commit 4ef844f

24 files changed

+359
-60
lines changed

.variables

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1+
export DO_UPDATE=true
12
export LEVEL=CRITICAL
23
export REPO_NAME=justice-unreal-sdk-plugin
3-
export WORKDIR=/tmp/pipelines/4795119003/954100842/
4-
export COMMIT_HASH=f94bed86624c3439c0c3f572d8b88253a3f29a6a
5-
export GIT_HASH=f94bed86624c3439c0c3f572d8b88253a3f29a6a
6-
export VERSION=23.6.1
7-
export REVISION_ID=23.6.1
4+
export WORKDIR=/tmp/pipelines/4867186400/966477212/
5+
export COMMIT_HASH=c438e9ab989b7814796fb3f944e7acafe1647fc8
6+
export GIT_HASH=c438e9ab989b7814796fb3f944e7acafe1647fc8
7+
export VERSION=23.7.0
8+
export REVISION_ID=23.7.0
89
9-
export COMMIT_MESSAGE_BASE64='Y2hvcmUocmVsZWFzZSk6IDIzLjYuMSAtIGNvbW1pdGVkIGFuZCB0YWdnZWQgYnkgSmVua2lucwo='
10+
export COMMIT_MESSAGE_BASE64='Y2hvcmUocmVsZWFzZSk6IDIzLjcuMCAtIGNvbW1pdGVkIGFuZCB0YWdnZWQgYnkgSmVua2lucwo='

AccelByteUe4Sdk.uplugin

-960 Bytes
Binary file not shown.

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,25 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5+
## [23.7.0](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/branches/compare/23.7.0%0D23.6.1) (2023-08-14)
6+
7+
8+
### Features
9+
10+
* bring back oculus iap sync ([92b2eef](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/92b2eefdf35ea9b96c631ef7f155b7e29a7adeb0))
11+
* **config:** omit server ClientId and ClientSecret from configuration file on shipping build ([5c2959c](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/5c2959cf78b34f1b9be4e4d1880ffe0a90e66a20))
12+
* **launcher:** read command line arguments for Justice Auth Code ([b586a69](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/b586a69fcad9959ec8aeea540ff8249f530d255f))
13+
* **telemetry:** add clientTimestamp ([511a4eb](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/511a4eb5eab3bd7801d3ec880d4efb7b5b2ac6e2))
14+
* **UGC:** add a new sort by value and devide liked content endpoint ([ac14217](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/ac14217f4b5acc188cde2e20794f8a741356aaa4))
15+
16+
17+
### Bug Fixes
18+
19+
* **core:** add scopelock on availableToken to handle multi thread requests ([0e4202c](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/0e4202c3714f7879a833eb9aafd64bfdcf2a99c9))
20+
* lobby not triggering ConnectionClosed after user disconnected because of login ban. ([536c5ac](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/536c5ac5365b312b4eca3dc98e3bb6598d511d4c))
21+
* Prebuild script failed when path contain spaces ([ee7241c](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/ee7241c0fc9f22630852d6519afaadc0f24be548))
22+
* removed encoding process in ConvertItemSortByToString utilites fucntion ([9358317](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/9358317d6558ff5522542b075bc5417e5d0eba85))
23+
524
### [23.6.1](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/branches/compare/23.6.1%0D23.6.0) (2023-08-03)
625

726

Content/CompatibilityMap.json

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,39 @@
11
{
22
"iam": {
3-
"minVersion": "6.2.0",
4-
"maxVersion": "6.2.0"
3+
"minVersion": "7.0.0",
4+
"maxVersion": "7.0.0"
55
},
66
"agreement": {
7-
"minVersion": "1.31.1",
8-
"maxVersion": "1.31.1"
7+
"minVersion": "1.31.2",
8+
"maxVersion": "1.31.2"
99
},
1010
"basic": {
1111
"minVersion": "2.10.1",
1212
"maxVersion": "2.10.1"
1313
},
1414
"platform": {
15-
"minVersion": "4.32.1",
16-
"maxVersion": "4.32.1"
15+
"minVersion": "4.33.0",
16+
"maxVersion": "4.33.0"
1717
},
1818
"social": {
19-
"minVersion": "2.9.2",
20-
"maxVersion": "2.9.2"
19+
"minVersion": "2.9.3",
20+
"maxVersion": "2.9.3"
2121
},
2222
"leaderboard": {
23-
"minVersion": "2.26.0",
24-
"maxVersion": "2.26.0"
23+
"minVersion": "2.26.1",
24+
"maxVersion": "2.26.1"
2525
},
2626
"achievement": {
2727
"minVersion": "2.21.0",
2828
"maxVersion": "2.21.0"
2929
},
3030
"cloudsave": {
31-
"minVersion": "3.10.0",
32-
"maxVersion": "3.10.0"
31+
"minVersion": "3.11.0",
32+
"maxVersion": "3.11.0"
3333
},
3434
"ugc": {
35-
"minVersion": "2.11.3",
36-
"maxVersion": "2.11.3"
35+
"minVersion": "2.12.0",
36+
"maxVersion": "2.12.0"
3737
},
3838
"group": {
3939
"minVersion": "2.18.1",
@@ -52,7 +52,7 @@
5252
"maxVersion": "6.3.6"
5353
},
5454
"game-telemetry": {
55-
"minVersion": "1.18.0",
56-
"maxVersion": "1.18.0"
55+
"minVersion": "1.19.0",
56+
"maxVersion": "1.19.0"
5757
}
5858
}

PreBuildProcessor.bat

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
@ECHO OFF
2+
SETLOCAL ENABLEDELAYEDEXPANSION
3+
4+
IF [%1]==[] GOTO usage
5+
IF [%2]==[] GOTO usage
6+
IF [%3]==[] GOTO usage
7+
IF [%4]==[] GOTO usage
8+
9+
SET EngineDir=%1
10+
SET ProjectDir=%2
11+
SET TargetConfiguration=%3
12+
SET TargetType=%4
13+
14+
SET ConfigFile="%ProjectDir:"=%\Config\DefaultGame.ini"
15+
SET BuildVersionFile="%EngineDir:"=%\Build\Build.version"
16+
SET IniSection=+IniSectionBlacklist
17+
18+
SET ServerSettingsSectionList=/Script/AccelByteUe4Sdk.AccelByteServerSettings ^
19+
/Script/AccelByteUe4Sdk.AccelByteServerSettingsDev ^
20+
/Script/AccelByteUe4Sdk.AccelByteServerSettingsCert ^
21+
/Script/AccelByteUe4Sdk.AccelByteServerSettingsProd
22+
23+
SET PackagingSettingSection=[/Script/UnrealEd.ProjectPackagingSettings]
24+
25+
CALL :get_engine_version Version
26+
IF %Version%==5 SET IniSection=+IniSectionDenylist
27+
28+
IF NOT %TargetConfiguration%==Shipping GOTO remove_section_blacklist
29+
IF %TargetType%==Editor GOTO remove_section_blacklist
30+
IF %TargetType%==Server GOTO remove_section_blacklist
31+
32+
CALL :append_section_blacklist
33+
EXIT /b 0
34+
35+
:usage
36+
ECHO Usage: PreBuildProcessor.bat {engine_dir} {project_dir} {target_configuration} {target_type}
37+
EXIT /b 1
38+
39+
:append_section_blacklist
40+
SET "ConfigFileTmp=%ConfigFile%.tmp"
41+
SET CurrentSection=
42+
SET FirstLine=True
43+
SET IsPackagingSettingSection=False
44+
45+
(FOR /f "usebackq eol=` delims=" %%i IN (%ConfigFile%) DO (
46+
SET Line=%%i
47+
IF "x!Line:~0,1!"=="x[" (
48+
IF !FirstLine!==True (
49+
SET FirstLine=False
50+
) ELSE (
51+
ECHO:
52+
)
53+
SET CurrentSection=!Line!
54+
IF !CurrentSection!==!PackagingSettingSection! (
55+
SET IsPackagingSettingSection=True
56+
)
57+
) ELSE (
58+
IF !CurrentSection!==!PackagingSettingSection! (
59+
FOR %%a IN (!ServerSettingsSectionList!) DO (
60+
IF !Line!==!IniSection!=%%a (
61+
SET Line=
62+
)
63+
)
64+
) ELSE (
65+
IF !IsPackagingSettingSection!==True (
66+
FOR %%a IN (!ServerSettingsSectionList!) DO (
67+
ECHO !IniSection!=%%a
68+
)
69+
SET IsPackagingSettingSection=False
70+
)
71+
)
72+
)
73+
IF NOT [!Line!] == [] ECHO !Line!
74+
))>"%ConfigFileTmp%"
75+
76+
IF !IsPackagingSettingSection!==True (
77+
(FOR %%a IN (!ServerSettingsSectionList!) DO (
78+
ECHO !IniSection!=%%a
79+
))>>"%ConfigFileTmp%"
80+
)
81+
82+
COPY /y %ConfigFileTmp% %ConfigFile% >NUL
83+
DEL %ConfigFileTmp%
84+
EXIT /B 0
85+
86+
:remove_section_blacklist
87+
SET "ConfigFileTmp=%ConfigFile%.tmp"
88+
SET CurrentSection=
89+
90+
SET FirstLine=True
91+
(FOR /f "usebackq eol=` delims=" %%i IN (%ConfigFile%) DO (
92+
SET Line=%%i
93+
IF "x!Line:~0,1!"=="x[" (
94+
IF !FirstLine!==True (
95+
SET FirstLine=False
96+
) ELSE (
97+
ECHO:
98+
)
99+
SET CurrentSection=!Line!
100+
) ELSE (
101+
IF !CurrentSection!==!PackagingSettingSection! (
102+
FOR %%a IN (!ServerSettingsSectionList!) DO (
103+
IF !Line!==!IniSection!=%%a (
104+
SET Line=
105+
)
106+
)
107+
)
108+
)
109+
IF NOT [!Line!] == [] ECHO !Line!
110+
))>"%ConfigFileTmp%"
111+
112+
COPY /y %ConfigFileTmp% %ConfigFile% >NUL
113+
DEL %ConfigFileTmp%
114+
EXIT /B 0
115+
116+
:get_engine_version
117+
SET BuildVersion=
118+
FOR /f "usebackq tokens=1,2" %%a IN (%BuildVersionFile%) DO (
119+
SET VersionInfoKey=%%a
120+
SET VersionInfoValue=%%b
121+
SET MajorVersionKey=!VersionInfoKey:MajorVersion=!
122+
IF NOT !VersionInfoKey!==!MajorVersionKey! (
123+
SET BuildVersion=!VersionInfoValue:,=!
124+
)
125+
)
126+
SET %~1=%BuildVersion%
127+
EXIT /B 0
128+
129+
:end
130+
ENDLOCAL

Source/AccelByteUe4Sdk/Private/Api/AccelByteChatApi.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,9 @@ namespace AccelByte
511511
, const FString& Reason
512512
, bool WasClean)
513513
{
514-
if (StatusCode >= 4000 && !bBanNotifReceived)
514+
// disconnect only if status code > 4000 and we don't receive a login ban,
515+
// other ban will try to reconnect the websocket
516+
if (StatusCode > 4000 && !(bBanNotifReceived && BanType != EBanType::LOGIN))
515517
{
516518
Disconnect();
517519
}
@@ -521,6 +523,8 @@ namespace AccelByte
521523
}
522524

523525
bBanNotifReceived = false;
526+
BanType = EBanType::EMPTY;
527+
524528
UE_LOG(LogAccelByteChat, Display, TEXT("Connection closed. Status code: %d Reason: %s Clean: %d"), StatusCode, *Reason, WasClean);
525529
ConnectionClosed.ExecuteIfBound(StatusCode, Reason, WasClean);
526530
}

Source/AccelByteUe4Sdk/Private/Api/AccelByteEntitlementApi.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -853,7 +853,7 @@ void Entitlement::SyncOculusConsumableEntitlements(THandler<TArray<FAccelByteMod
853853
, *CredentialsRef.GetUserId());
854854
HttpClient.ApiRequest(TEXT("PUT"), Url, {}, OnSuccess, OnError);
855855
}
856-
856+
857857
void Entitlement::SyncOculusDLC(FVoidHandler const& OnSuccess
858858
, FErrorHandler const& OnError)
859859
{

Source/AccelByteUe4Sdk/Private/Api/AccelByteGameTelemetryApi.cpp

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ GameTelemetry::GameTelemetry(Credentials& InCredentialsRef
2323
, CredentialsRef{InCredentialsRef}
2424
, ShuttingDown(false)
2525
{
26-
CredentialsRef.OnLoginSuccess().AddRaw(this, &GameTelemetry::OnLoginSuccess);
26+
GameTelemetryLoginSuccess = CredentialsRef.OnLoginSuccess().AddRaw(this, &GameTelemetry::OnLoginSuccess);
2727
}
2828

2929
GameTelemetry::~GameTelemetry()
@@ -47,6 +47,12 @@ void GameTelemetry::SetBatchFrequency(FTimespan Interval)
4747
UE_LOG(LogAccelByte, Warning, TEXT("Telemetry schedule interval is too small! Set to %f seconds."), MINIMUM_INTERVAL_TELEMETRY.GetTotalSeconds());
4848
TelemetryInterval = MINIMUM_INTERVAL_TELEMETRY;
4949
}
50+
if (bTelemetryJobStarted)
51+
{
52+
FTickerAlias::GetCoreTicker().RemoveTicker(GameTelemetryTickDelegateHandle);
53+
GameTelemetryTickDelegateHandle.Reset();
54+
GameTelemetryTickDelegateHandle = FTickerAlias::GetCoreTicker().AddTicker(GameTelemetryTickDelegate, static_cast<float>(TelemetryInterval.GetTotalSeconds()));
55+
}
5056
}
5157

5258
void GameTelemetry::SetImmediateEventList(TArray<FString> const& EventNames)
@@ -65,9 +71,9 @@ void GameTelemetry::Send(FAccelByteModelsTelemetryBody TelemetryBody
6571

6672
FReport::Log(FString(__FUNCTION__));
6773

68-
if(TelemetryBody.EventTimestamp.GetTicks() == 0)
74+
if(TelemetryBody.ClientTimestamp.GetTicks() == 0)
6975
{
70-
TelemetryBody.EventTimestamp = FDateTime::UtcNow();
76+
TelemetryBody.ClientTimestamp = FDateTime::UtcNow();
7177
}
7278

7379
if (ImmediateEvents.Contains(TelemetryBody.EventName))
@@ -108,6 +114,11 @@ void GameTelemetry::Shutdown()
108114
FTickerAlias::GetCoreTicker().RemoveTicker(GameTelemetryTickDelegateHandle);
109115
GameTelemetryTickDelegateHandle.Reset();
110116
}
117+
118+
if (GameTelemetryLoginSuccess.IsValid())
119+
{
120+
CredentialsRef.OnLoginSuccess().Remove(GameTelemetryLoginSuccess);
121+
}
111122
// flush events
112123
Flush();
113124
}
@@ -178,7 +189,7 @@ void GameTelemetry::SendProtectedEvents(TArray<TSharedPtr<FAccelByteModelsTeleme
178189
JsonObject->SetStringField("EventNamespace", Event->EventNamespace);
179190
JsonObject->SetStringField("EventName", Event->EventName);
180191
JsonObject->SetObjectField("Payload", Event->Payload);
181-
JsonObject->SetStringField("EventTimestamp", Event->EventTimestamp.ToIso8601());
192+
JsonObject->SetStringField("ClientTimestamp", Event->ClientTimestamp.ToIso8601());
182193

183194
JsonArray.Add(MakeShared<FJsonValueObject>(JsonObject));
184195
}
@@ -260,7 +271,7 @@ bool GameTelemetry::JobArrayQueueAsJsonString(FString& OutJsonString)
260271
JsonObj->SetStringField("EventName", EventPtr->EventName);
261272
JsonObj->SetStringField("EventNamespace", EventPtr->EventNamespace);
262273
JsonObj->SetObjectField("Payload", EventPtr->Payload);
263-
JsonObj->SetNumberField("EventTimestamp", EventPtr->EventTimestamp.ToUnixTimestamp());
274+
JsonObj->SetNumberField("ClientTimestamp", EventPtr->ClientTimestamp.ToUnixTimestamp());
264275
TSharedRef<FJsonValueObject> JsonValue = MakeShared<FJsonValueObject>(JsonObj);
265276
EventsObjArray.Add(JsonValue);
266277
}
@@ -294,13 +305,13 @@ bool GameTelemetry::EventsJsonToArray(FString& InJsonString
294305
auto& JsonObj = ArrayItem->AsObject();
295306
FString EventName, EventNamespace;
296307
TSharedPtr<FJsonObject> const* Payload = nullptr;
297-
int32 EventTimeStamp = 0;
308+
int32 ClientTimestamp = 0;
298309
FAccelByteModelsTelemetryBody TelemetryBody;
299310
TelemetryBody.EventName = JsonObj->GetStringField("EventName");
300311
TelemetryBody.EventNamespace = JsonObj->GetStringField("EventNamespace");
301312
TelemetryBody.Payload = JsonObj->GetObjectField("Payload");
302-
EventTimeStamp = JsonObj->GetIntegerField("EventTimestamp");
303-
TelemetryBody.EventTimestamp = FDateTime::FromUnixTimestamp(EventTimeStamp);
313+
ClientTimestamp = JsonObj->GetIntegerField("ClientTimestamp");
314+
TelemetryBody.ClientTimestamp = FDateTime::FromUnixTimestamp(ClientTimestamp);
304315
OutArray.Add(MakeShared<FAccelByteModelsTelemetryBody>(TelemetryBody));
305316
}
306317
return true;

Source/AccelByteUe4Sdk/Private/Api/AccelByteLobbyApi.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1648,8 +1648,10 @@ void Lobby::OnClosed(int32 StatusCode
16481648
, const FString& Reason
16491649
, bool WasClean)
16501650
{
1651+
// disconnect only if status code > 4000 and we don't receive a login ban,
1652+
// other ban will try to reconnect the websocket
16511653
bool bIsReconnecting {true};
1652-
if (StatusCode > 4000 && !BanNotifReceived)
1654+
if (StatusCode > 4000 && !(BanNotifReceived && BanType != EBanType::LOGIN))
16531655
{
16541656
bIsReconnecting = false;
16551657
Disconnect();
@@ -1659,6 +1661,7 @@ void Lobby::OnClosed(int32 StatusCode
16591661
TokenRefreshDelegateHandle.Reset();
16601662

16611663
BanNotifReceived = false;
1664+
BanType = EBanType::EMPTY;
16621665

16631666
UE_LOG(LogAccelByteLobby, Display, TEXT("Connection closed. Status code: %d Reason: %s Clean: %s Reconnecting: %s"),
16641667
StatusCode, *Reason, WasClean? TEXT("true") : TEXT("false"), bIsReconnecting? TEXT("true") : TEXT("false"));
@@ -2360,6 +2363,7 @@ void Lobby::HandleMessageNotif(const FString& ReceivedMessageType
23602363
//CredentialsRef.OnTokenRefreshed().Remove(TokenRefreshDelegateHandle);
23612364
if (FAccelByteJsonConverter::JsonObjectStringToUStruct(ParsedJsonString, &Result))
23622365
{
2366+
BanType = Result.Ban;
23632367
if (Result.UserId == CredentialsRef.GetUserId())
23642368
{
23652369
HttpRef.BearerAuthRejected();

0 commit comments

Comments
 (0)