Skip to content

Commit 7c25284

Browse files
Updated from pipeline, Version : 22.0.0
1 parent 1d93480 commit 7c25284

28 files changed

+460
-53
lines changed

.variables

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
export LEVEL=CRITICAL
22
export REPO_NAME=justice-unreal-sdk-plugin
3-
export WORKDIR=/tmp/pipelines/3952125361/809385160/
4-
export COMMIT_HASH=a6b716c7e9fb15c1d040dfa72c1a049821a0c4a4
5-
export GIT_HASH=a6b716c7e9fb15c1d040dfa72c1a049821a0c4a4
6-
export VERSION=21.3.2
7-
export REVISION_ID=21.3.2
3+
export WORKDIR=/tmp/pipelines/4006750381/818925355/
4+
export COMMIT_HASH=1b735e83099c6a61ca5d9ed8c8d7bb682c44effe
5+
export GIT_HASH=1b735e83099c6a61ca5d9ed8c8d7bb682c44effe
6+
export VERSION=22.0.0
7+
export REVISION_ID=22.0.0
88
9-
export COMMIT_MESSAGE_BASE64='Y2hvcmUocmVsZWFzZSk6IDIxLjMuMiAtIGNvbW1pdGVkIGFuZCB0YWdnZWQgYnkgSmVua2lucwo='
9+
export COMMIT_MESSAGE_BASE64='Y2hvcmUocmVsZWFzZSk6IDIyLjAuMCAtIGNvbW1pdGVkIGFuZCB0YWdnZWQgYnkgSmVua2lucwo='

AccelByteUe4Sdk.uplugin

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"FileVersion": 3,
3-
"Version": 23,
4-
"VersionName": "21.3.2",
3+
"Version": 24,
4+
"VersionName": "22.0.0",
55
"FriendlyName": "AccelByte Unreal Engine SDK",
66
"Description": "Official AccelByte SDK for Unreal Engine 4",
77
"Category": "Online Platform",

CHANGELOG.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,29 @@
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+
## [22.0.0](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/branches/compare/22.0.0%0D21.3.2) (2023-03-27)
6+
7+
8+
### ⚠ BREAKING CHANGES
9+
10+
* **chat:** Optional bool enum members changed
11+
* **session:** changed OnSuccess result of ServerSession::QueryPartySessions from FAccelByteModelsV2QueryPartiesResponse to FAccelByteModelsV2PaginatedPartyQueryResult
12+
13+
### Features
14+
15+
* **lobby:** lobby errorNotif will trigger response delegate when there is a request associated with it. ([1704af4](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/1704af409d9c8694803334bd9458247f73d9d36e))
16+
* **session:** use paginated model in server query party sessions ([2ec636f](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/2ec636ff526b7abc9c09bc132043c69e532e590a))
17+
* **UserProfile:** add bulk get user profile with array param ([06e53e5](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/06e53e5d27da0ffea1997105a8113ea0f4fb09ca))
18+
19+
20+
### Bug Fixes
21+
22+
* add missing blueprint function for lobby, party and chat v1 ([8435359](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/843535961dedfd68b98d9f9eda12d09530c40e9c))
23+
* **chat:** refactor optional bool model to avoid compile error in mac ([afd4d50](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/afd4d5000f92e7ccfcbfdd0283fed5af7ad0227b))
24+
* **HttpCache:** configurable HTTP caching mode (MEMORY & STORAGE) ([47041e6](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/47041e662649a2dd23022ccd33750eefd6c3e9db))
25+
* **HTTPCache:** move the free cache to the SDK module shutdown ([b24e036](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/b24e036449933253c9900bae9d915b823fa3d5b3))
26+
* **session:** keep previous ServerSession::QueryPartySessions to avoid breaking change ([002c0ad](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/002c0adef6879ba4ce0ffc74f68874f175d7ca7c))
27+
528
### [21.3.2](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/branches/compare/21.3.2%0D21.3.1) (2023-03-17)
629

730

Content/CompatibilityMap.json

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,47 @@
11
{
22
"iam": {
3-
"minVersion": "5.30.0",
4-
"maxVersion": "5.30.0"
3+
"minVersion": "5.31.0",
4+
"maxVersion": "5.31.0"
55
},
66
"agreement": {
7-
"minVersion": "1.28.0",
8-
"maxVersion": "1.28.0"
7+
"minVersion": "1.28.1",
8+
"maxVersion": "1.28.1"
99
},
1010
"basic": {
11-
"minVersion": "2.7.0",
12-
"maxVersion": "2.7.0"
11+
"minVersion": "2.8.0",
12+
"maxVersion": "2.8.0"
1313
},
1414
"platform": {
15-
"minVersion": "4.26.0",
16-
"maxVersion": "4.26.0"
15+
"minVersion": "4.27.0",
16+
"maxVersion": "4.27.0"
1717
},
1818
"social": {
19-
"minVersion": "2.2.0",
20-
"maxVersion": "2.2.0"
19+
"minVersion": "2.3.0",
20+
"maxVersion": "2.3.0"
2121
},
2222
"leaderboard": {
23-
"minVersion": "2.19.4",
24-
"maxVersion": "2.19.4"
23+
"minVersion": "2.19.5",
24+
"maxVersion": "2.19.5"
2525
},
2626
"achievement": {
2727
"minVersion": "2.17.0",
2828
"maxVersion": "2.17.0"
2929
},
3030
"cloudsave": {
31-
"minVersion": "3.6.3",
32-
"maxVersion": "3.6.3"
31+
"minVersion": "3.6.4",
32+
"maxVersion": "3.6.4"
3333
},
3434
"ugc": {
3535
"minVersion": "2.9.3",
3636
"maxVersion": "2.9.3"
3737
},
3838
"lobby": {
39-
"minVersion": "3.16.0",
40-
"maxVersion": "3.16.0"
39+
"minVersion": "3.17.0",
40+
"maxVersion": "3.17.0"
4141
},
4242
"group": {
43-
"minVersion": "2.15.2",
44-
"maxVersion": "2.15.2"
43+
"minVersion": "2.15.3",
44+
"maxVersion": "2.15.3"
4545
},
4646
"qosm": {
4747
"minVersion": "1.18.0",

Source/AccelByteUe4Sdk/Private/AccelByteUe4SdkModule.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ void FAccelByteUe4SdkModule::ShutdownModule()
108108
#endif
109109
FRegistry::GameTelemetry.Shutdown();
110110
FRegistry::Credentials.Shutdown();
111+
FRegistry::HttpRetryScheduler.GetHttpCache().ClearCache();
111112
FRegistry::HttpRetryScheduler.Shutdown();
112113

113114
UnregisterSettings();

Source/AccelByteUe4Sdk/Private/Api/AccelByteChatApi.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1033,9 +1033,9 @@ namespace AccelByte
10331033
FJsonDomBuilder::FObject Item;
10341034
Item.Set(ChatToken::Json::Field::MessageId, ActionUpdateSystemMessage.ID);
10351035
Item.Set(ChatToken::Json::Field::SystemMessageRead
1036-
, FAccelByteUtilities::GetUEnumValueAsString(ActionUpdateSystemMessage.Read));
1036+
, ActionUpdateSystemMessage.GetReadAsString());
10371037
Item.Set(ChatToken::Json::Field::SystemMessageKeep
1038-
, FAccelByteUtilities::GetUEnumValueAsString(ActionUpdateSystemMessage.Keep));
1038+
, ActionUpdateSystemMessage.GetKeepAsString());
10391039

10401040
JsonActionUpdateSystemMessages.Add(Item);
10411041
}

Source/AccelByteUe4Sdk/Private/Api/AccelByteLobbyApi.cpp

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2362,7 +2362,32 @@ void Lobby::HandleMessageNotif(const FString& ReceivedMessageType
23622362
}
23632363
case (Notif::ErrorNotif):
23642364
{
2365-
ErrorNotif.ExecuteIfBound(ParsedJsonObj->GetIntegerField(TEXT("code")), ParsedJsonObj->GetStringField(TEXT("message")));
2365+
FString ErrorNotifRequestType = ParsedJsonObj->GetStringField(TEXT("requestType"));
2366+
2367+
// Handle trigger ResponseDelegates when ErrorNotif arrived with "requestType" field
2368+
if(!ErrorNotifRequestType.IsEmpty())
2369+
{
2370+
// Replace "Request" at end of string with "Response"
2371+
const FString RequestString = {TEXT("Request")};
2372+
if(ErrorNotifRequestType.EndsWith(RequestString))
2373+
{
2374+
ErrorNotifRequestType = ErrorNotifRequestType.LeftChop(RequestString.Len()).Append(TEXT("Response"));
2375+
}
2376+
2377+
FAccelByteModelsLobbyBaseResponse ErrorRequestResponse;
2378+
ErrorRequestResponse.Code = ParsedJsonObj->GetStringField(TEXT("code"));
2379+
ErrorRequestResponse.Id = ParsedJsonObj->GetStringField("id");
2380+
ErrorRequestResponse.Type = ErrorNotifRequestType;
2381+
2382+
TSharedPtr<FJsonObject> ErrorRequestJsonObject = FJsonObjectConverter::UStructToJsonObject(ErrorRequestResponse);
2383+
FString ErrorRequestJsonString;
2384+
FJsonObjectConverter::UStructToJsonObjectString(ErrorRequestResponse, ErrorRequestJsonString);
2385+
HandleMessageResponse(ErrorNotifRequestType, ErrorRequestJsonString, ErrorRequestJsonObject);
2386+
}
2387+
else
2388+
{
2389+
ErrorNotif.ExecuteIfBound(ParsedJsonObj->GetIntegerField(TEXT("code")), ParsedJsonObj->GetStringField(TEXT("message")));
2390+
}
23662391
break;
23672392
}
23682393
case (Notif::SignalingP2PNotif):

Source/AccelByteUe4Sdk/Private/Api/AccelByteUGCApi.cpp

Lines changed: 75 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,36 @@ UGC::UGC(Credentials const& InCredentialsRef
2323

2424
UGC::~UGC(){}
2525

26+
FString UGC::ConvertUGCSortByToString(const EAccelByteUgcSortBy& SortBy)
27+
{
28+
switch (SortBy)
29+
{
30+
case EAccelByteUgcSortBy::NAME:
31+
return TEXT("name");
32+
case EAccelByteUgcSortBy::DATE:
33+
return TEXT("date");
34+
case EAccelByteUgcSortBy::DOWNLOAD:
35+
return TEXT("download");
36+
case EAccelByteUgcSortBy::LIKE:
37+
return TEXT("like");
38+
default:
39+
return TEXT("");
40+
}
41+
}
42+
43+
FString UGC::ConvertUGCOrderByToString(const EAccelByteUgcOrderBy& OrderBy)
44+
{
45+
switch (OrderBy)
46+
{
47+
case EAccelByteUgcOrderBy::ASC:
48+
return TEXT("asc");
49+
case EAccelByteUgcOrderBy::DESC:
50+
return TEXT("desc");
51+
default:
52+
return TEXT("");
53+
}
54+
}
55+
2656
void UGC::CreateContent(FString const& ChannelId
2757
, FAccelByteModelsUGCRequest const& CreateRequest
2858
, THandler<FAccelByteModelsUGCResponse> const& OnSuccess
@@ -72,7 +102,7 @@ void UGC::CreateContent(FString const& ChannelId
72102

73103
void UGC::ModifyContent(FString const& ChannelId
74104
, FString const& ContentId
75-
, FAccelByteModelsUGCRequest const& ModifyRequest
105+
, FAccelByteModelsUGCUpdateRequest const& ModifyRequest
76106
, THandler<FAccelByteModelsUGCResponse> const& OnSuccess
77107
, FErrorHandler const& OnError)
78108
{
@@ -85,7 +115,7 @@ void UGC::ModifyContent(FString const& ChannelId
85115
, *ChannelId
86116
, *ContentId);
87117

88-
FAccelByteModelsUGCRequest Request = ModifyRequest;
118+
FAccelByteModelsUGCUpdateRequest Request = ModifyRequest;
89119
if (Request.ContentType.IsEmpty())
90120
{
91121
Request.ContentType = TEXT("application/octet-stream");
@@ -94,6 +124,29 @@ void UGC::ModifyContent(FString const& ChannelId
94124
HttpClient.ApiRequest(TEXT("PUT"), Url, {}, Request, OnSuccess, OnError);
95125
}
96126

127+
void UGC::ModifyContent(FString const& ChannelId
128+
, FString const& ContentId
129+
, FAccelByteModelsUGCRequest const& ModifyRequest
130+
, THandler<FAccelByteModelsUGCResponse> const& OnSuccess
131+
, FErrorHandler const& OnError)
132+
{
133+
FReport::Log(FString(__FUNCTION__));
134+
FReport::LogDeprecated(FString(__FUNCTION__), TEXT("The API might be removed without notice, please use ModifyContent(.., FAccelByteModelsUGCUpdateRequest const& ModifyRequest, ..) instead!!"));
135+
136+
FAccelByteModelsUGCUpdateRequest Req;
137+
Req.Name = ModifyRequest.Name;
138+
Req.Type = ModifyRequest.Type;
139+
Req.SubType = ModifyRequest.SubType;
140+
Req.Tags = ModifyRequest.Tags;
141+
Req.Preview = FBase64::Encode(ModifyRequest.Preview);
142+
Req.FileExtension = ModifyRequest.FileExtension;
143+
Req.ContentType = ModifyRequest.ContentType;
144+
Req.PreviewMetadata = ModifyRequest.PreviewMetadata;
145+
Req.UpdateContentFile = true;
146+
147+
ModifyContent(ChannelId, ContentId, Req, OnSuccess, OnError);
148+
}
149+
97150
void UGC::ModifyContent(FString const& ChannelId
98151
, FString const& ContentId
99152
, FString const& Name
@@ -107,7 +160,8 @@ void UGC::ModifyContent(FString const& ChannelId
107160
, FString ContentType)
108161
{
109162
FReport::Log(FString(__FUNCTION__));
110-
163+
FReport::LogDeprecated(FString(__FUNCTION__), TEXT("The API might be removed without notice, please use ModifyContent(.., FAccelByteModelsUGCUpdateRequest const& ModifyRequest, ..) instead!!"));
164+
111165
FAccelByteModelsUGCRequest Req;
112166
Req.Name = Name;
113167
Req.Type = Type;
@@ -288,10 +342,21 @@ void UGC::GetChannels(THandler<FAccelByteModelsUGCChannelsPagingResponse> const&
288342
{
289343
FReport::Log(FString(__FUNCTION__));
290344

345+
GetChannels(CredentialsRef.GetUserId(), OnSuccess, OnError, Limit, Offset);
346+
}
347+
348+
void UGC::GetChannels(FString const& UserId
349+
, THandler<FAccelByteModelsUGCChannelsPagingResponse> const& OnSuccess
350+
, FErrorHandler const& OnError
351+
, int32 Limit
352+
, int32 Offset)
353+
{
354+
FReport::Log(FString(__FUNCTION__));
355+
291356
const FString Url = FString::Printf(TEXT("%s/v1/public/namespaces/%s/users/%s/channels")
292357
, *SettingsRef.UGCServerUrl
293358
, *CredentialsRef.GetNamespace()
294-
, *CredentialsRef.GetUserId());
359+
, *UserId);
295360

296361
TMap<FString, FString> QueryParams;
297362
if (Offset > 0)
@@ -342,8 +407,8 @@ void UGC::SearchContents(const FString& Name
342407
, *CredentialsRef.GetNamespace());
343408

344409
FString QueryParams = FAccelByteUtilities::CreateQueryParams({
345-
{ TEXT("sortby"), FAccelByteUtilities::GetUEnumValueAsString(SortBy) },
346-
{ TEXT("orderby"), FAccelByteUtilities::GetUEnumValueAsString(OrderBy) },
410+
{ TEXT("sortby"), ConvertUGCSortByToString(SortBy) },
411+
{ TEXT("orderby"), ConvertUGCOrderByToString(OrderBy) },
347412
{ TEXT("name"), FGenericPlatformHttp::UrlEncode(Name) },
348413
{ TEXT("creator"), FGenericPlatformHttp::UrlEncode(Creator) },
349414
{ TEXT("type"), FGenericPlatformHttp::UrlEncode(Type) },
@@ -442,8 +507,8 @@ void UGC::SearchContentsSpecificToChannel(const FString& ChannelId
442507
, *ChannelId);
443508

444509
FString QueryParams = FAccelByteUtilities::CreateQueryParams({
445-
{ TEXT("sortby"), FAccelByteUtilities::GetUEnumValueAsString(SortBy) },
446-
{ TEXT("orderby"), FAccelByteUtilities::GetUEnumValueAsString(OrderBy) },
510+
{ TEXT("sortby"), ConvertUGCSortByToString(SortBy) },
511+
{ TEXT("orderby"), ConvertUGCOrderByToString(OrderBy) },
447512
{ TEXT("name"), FGenericPlatformHttp::UrlEncode(Name) },
448513
{ TEXT("creator"), FGenericPlatformHttp::UrlEncode(Creator) },
449514
{ TEXT("type"), FGenericPlatformHttp::UrlEncode(Type) },
@@ -593,8 +658,8 @@ void UGC::GetLikedContent(const TArray<FString>& Tags
593658
{ TEXT("isofficial"), IsOfficial ? TEXT("true") : TEXT("false")},
594659
{ TEXT("limit"), Limit >= 0 ? FString::FromInt(Limit) : TEXT("") },
595660
{ TEXT("offset"), Limit >= 0 ? FString::FromInt(Offset) : TEXT("") },
596-
{ TEXT("sortby"), FAccelByteUtilities::GetUEnumValueAsString(SortBy) },
597-
{ TEXT("orderby"), FAccelByteUtilities::GetUEnumValueAsString(OrderBy) },
661+
{ TEXT("sortby"), ConvertUGCSortByToString(SortBy) },
662+
{ TEXT("orderby"), ConvertUGCOrderByToString(OrderBy) },
598663
});
599664
Url.Append(QueryParams);
600665

Source/AccelByteUe4Sdk/Private/Api/AccelByteUserApi.cpp

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,17 @@ bool IsTokenExpired(FRefreshInfo RefreshInfo)
358358
void User::TryRelogin(const FString& PlatformUserID
359359
, const FVoidHandler& OnSuccess
360360
, const FErrorHandler& OnError)
361+
{
362+
TryRelogin(PlatformUserID, OnSuccess, FOAuthErrorHandler::CreateLambda([OnError]
363+
(int32 ErrorCode, const FString& ErrorMessage, const FErrorOAuthInfo& ErrorObject )
364+
{
365+
OnError.ExecuteIfBound(ErrorCode, ErrorMessage);
366+
}));
367+
}
368+
369+
void User::TryRelogin(const FString& PlatformUserID
370+
, const FVoidHandler& OnSuccess
371+
, const FOAuthErrorHandler& OnError)
361372
{
362373
#if PLATFORM_WINDOWS
363374
FReport::Log(FString(__FUNCTION__));
@@ -368,28 +379,28 @@ void User::TryRelogin(const FString& PlatformUserID
368379
{
369380
if (Pair.Key.IsEmpty() || Pair.Value.IsEmpty())
370381
{
371-
OnError.ExecuteIfBound(static_cast<int32>(ErrorCodes::CachedTokenNotFound), TEXT("The cached token is not found. Cannot continue the previous login session. Please login again."));
382+
OnError.ExecuteIfBound(static_cast<int32>(ErrorCodes::CachedTokenNotFound), TEXT("The cached token is not found. Cannot continue the previous login session. Please login again."), FErrorOAuthInfo{});
372383
return;
373384
}
374385

375386
auto Decoded = FAccelByteUtilities::XOR(Pair.Value, FAccelByteUtilities::GetDeviceId());
376387
FRefreshInfo RefreshInfo;
377388
if (!FJsonObjectConverter::JsonObjectStringToUStruct<FRefreshInfo>(Decoded, &RefreshInfo, 0, 0))
378389
{
379-
OnError.ExecuteIfBound(static_cast<int32>(ErrorCodes::UnableToSerializeCachedToken), TEXT("The cached token can't be parsed. Cannot continue the previous login session. Please login again."));
390+
OnError.ExecuteIfBound(static_cast<int32>(ErrorCodes::UnableToSerializeCachedToken), TEXT("The cached token can't be parsed. Cannot continue the previous login session. Please login again."), FErrorOAuthInfo{});
380391
return;
381392
}
382393

383394
if (IsTokenExpired(RefreshInfo))
384395
{
385-
OnError.ExecuteIfBound(static_cast<int32>(ErrorCodes::CachedTokenExpired), TEXT("Your previous login session is expired. Please login again."));
396+
OnError.ExecuteIfBound(static_cast<int32>(ErrorCodes::CachedTokenExpired), TEXT("Your previous login session is expired. Please login again."), FErrorOAuthInfo{});
386397
return;
387398
}
388399

389400
this->LoginWithRefreshToken(RefreshInfo.RefreshToken, OnSuccess, OnError);
390401
}));
391402
#else
392-
OnError.ExecuteIfBound(static_cast<int32>(ErrorCodes::CachedTokenNotFound), TEXT("Cannot relogin using cached token on other platforms."));
403+
OnError.ExecuteIfBound(static_cast<int32>(ErrorCodes::CachedTokenNotFound), TEXT("Cannot relogin using cached token on other platforms."), FErrorOAuthInfo{});
393404
#endif
394405
}
395406

0 commit comments

Comments
 (0)