Skip to content

Commit 8b5f25d

Browse files
Updated from pipeline, Version : 22.0.1
1 parent 7c25284 commit 8b5f25d

40 files changed

+1439
-125
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/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
3+
export WORKDIR=/tmp/pipelines/4020753730/821125574/
4+
export COMMIT_HASH=41d1d509024e9443c5ca71d3b952749b70319e1d
5+
export GIT_HASH=41d1d509024e9443c5ca71d3b952749b70319e1d
6+
export VERSION=22.0.1
7+
export REVISION_ID=22.0.1
88
9-
export COMMIT_MESSAGE_BASE64='Y2hvcmUocmVsZWFzZSk6IDIyLjAuMCAtIGNvbW1pdGVkIGFuZCB0YWdnZWQgYnkgSmVua2lucwo='
9+
export COMMIT_MESSAGE_BASE64='Y2hvcmUocmVsZWFzZSk6IDIyLjAuMSAtIGNvbW1pdGVkIGFuZCB0YWdnZWQgYnkgSmVua2lucwo='

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": 24,
4-
"VersionName": "22.0.0",
3+
"Version": 25,
4+
"VersionName": "22.0.1",
55
"FriendlyName": "AccelByte Unreal Engine SDK",
66
"Description": "Official AccelByte SDK for Unreal Engine 4",
77
"Category": "Online Platform",

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,22 @@
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.1](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/branches/compare/22.0.1%0D22.0.0) (2023-03-29)
6+
7+
8+
### Features
9+
10+
* add public statistic cycle endpoint ([372b4d8](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/372b4d85c60a4f0995b110ced0414653f417abd8))
11+
* **chat:** add get system message stats api ([5a62f1b](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/5a62f1b9f6e4308ca7ad77a1c2a28709ea78c34e))
12+
* **DS:** sdk emits StatsD metrics ([dda9b7a](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/dda9b7a7c9d77f331fff134c4e93b31f3a2bb58a))
13+
14+
15+
### Bug Fixes
16+
17+
* **blueprint:** add mising login & credential function ([4bc3448](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/4bc3448930842231d1affba7d18be366110f538d))
18+
* **lobby:** keep lobby connected if refresh token failed and disconnect when token expired ([c73639d](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/c73639ddc960e55361f2006ae33bf27d9a552091))
19+
* **UGC:** UGC missing CustomAttribute field assignment ([d90bbe5](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/d90bbe5ef5ecb624ea4d9e0797850916945dc500))
20+
521
## [22.0.0](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/branches/compare/22.0.0%0D21.3.2) (2023-03-27)
622

723

Source/AccelByteUe4Sdk/Private/Api/AccelByteChatApi.cpp

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ namespace AccelByte
4343
const FString DeleteSystemMessages = TEXT("actionDeleteSystemMessages");
4444
const FString UpdateSystemMessages = TEXT("actionUpdateSystemMessages");
4545
const FString QuerySystemMessage = TEXT("actionQuerySystemMessage");
46+
const FString GetSystemMessageStats = TEXT("actionGetSystemMessageStats");
4647

4748
const FString UpdateTopic = TEXT("actionUpdateTopic");
4849
const FString DeleteTopic = TEXT("actionDeleteTopic");
@@ -108,6 +109,7 @@ namespace AccelByte
108109
const FString ExpiredAt = TEXT("expiredAt");
109110
const FString StartCreatedAt = TEXT("startCreatedAt");
110111
const FString EndCreatedAt = TEXT("endCreatedAt");
112+
const FString OldestUnread = TEXT("oldestUnread");
111113

112114
const FString Data = TEXT("data");
113115

@@ -159,6 +161,7 @@ namespace AccelByte
159161
DeleteSystemMessagesResponse,
160162
UpdateSystemMessagesResponse,
161163
QuerySystemMessageResponse,
164+
GetSystemMessageStatsResponse,
162165

163166
RefreshTokenResponse,
164167

@@ -290,7 +293,12 @@ namespace AccelByte
290293
{
291294
ConvertJsonFieldTimeUnixToIso8601(SubObject, ChatToken::Json::Field::CreatedAt);
292295
}
293-
296+
if(RootDateTimeField != ChatToken::Json::Field::OldestUnread
297+
&& SubObject->HasField(ChatToken::Json::Field::OldestUnread))
298+
{
299+
ConvertJsonFieldTimeUnixToIso8601(SubObject, ChatToken::Json::Field::OldestUnread);
300+
}
301+
294302
if (SubObject->HasField(ChatToken::Json::Field::Data))
295303
{
296304
TArray<TSharedPtr<FJsonValue>> Datas;
@@ -353,6 +361,7 @@ namespace AccelByte
353361
FORM_STRING_ENUM_PAIR_RESPONSE(DeleteSystemMessages),
354362
FORM_STRING_ENUM_PAIR_RESPONSE(UpdateSystemMessages),
355363
FORM_STRING_ENUM_PAIR_RESPONSE(QuerySystemMessage),
364+
FORM_STRING_ENUM_PAIR_RESPONSE(GetSystemMessageStats),
356365

357366
FORM_STRING_ENUM_PAIR_RESPONSE(BlockUser),
358367
FORM_STRING_ENUM_PAIR_RESPONSE(UnblockUser),
@@ -784,6 +793,7 @@ namespace AccelByte
784793
CASE_RESPONSE_ID_EXPLICIT_MODEL(UpdateSystemMessages, FAccelByteModelsUpdateSystemMessagesResponse)
785794
CASE_RESPONSE_ID_EXPLICIT_MODEL(DeleteSystemMessages, FAccelByteModelsDeleteSystemMessagesResponse)
786795
CASE_RESPONSE_ID_EXPLICIT_MODEL(QuerySystemMessage, FAccelByteModelsQuerySystemMessagesResponse)
796+
CASE_RESPONSE_ID_EXPLICIT_MODEL(GetSystemMessageStats, FAccelByteGetSystemMessageStatsResponse)
787797

788798
CASE_NOTIF_EXPLICIT_MODEL(ChatNotif, FAccelByteModelsChatNotif)
789799
CASE_NOTIF_EXPLICIT_MODEL(ReadChatNotif, FAccelByteModelsReadChatNotif)
@@ -1081,6 +1091,16 @@ namespace AccelByte
10811091
SEND_CONTENT_CACHE_ID(QuerySystemMessage);
10821092
}
10831093

1094+
void Chat::GetSystemMessageStats(const FGetSystemMessageStatsResponse& OnSuccess, const FErrorHandler& OnError,
1095+
const FAccelByteGetSystemMessageStatsRequest Request)
1096+
{
1097+
FReport::Log(FString(__FUNCTION__));
1098+
1099+
FJsonDomBuilder::FObject Params;
1100+
1101+
SEND_CONTENT_CACHE_ID(GetSystemMessageStats);
1102+
}
1103+
10841104
void Chat::QueryTopic(const FAccelByteModelsChatQueryTopicRequest& Request
10851105
, const FQueryTopicResponse& OnSuccess
10861106
, const FErrorHandler& OnError)

Source/AccelByteUe4Sdk/Private/Api/AccelByteEntitlementApi.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,8 @@ void Entitlement::SyncPlatformPurchase(FAccelByteModelsEntitlementSyncBase Entit
496496
OnError.ExecuteIfBound(static_cast<int32>(ErrorCodes::IsNotLoggedIn), TEXT("User not logged in with 3rd Party Platform"));
497497
return;
498498
}
499+
bSyncForSingleProduct = false;
500+
SyncRequestJson->SetStringField(TEXT("epicGamesJwtToken"), EntitlementSyncBase.EpicGamesJwtToken);
499501
break;
500502
default:
501503
OnError.ExecuteIfBound(static_cast<int32>(ErrorCodes::InvalidRequest), TEXT("Platform Sync Type is not found"));

Source/AccelByteUe4Sdk/Private/Api/AccelByteLobbyApi.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1591,10 +1591,6 @@ void Lobby::OnConnected()
15911591
{
15921592
RefreshToken(CredentialsRef.GetAccessToken());
15931593
}
1594-
else
1595-
{
1596-
Disconnect(true);
1597-
}
15981594
});
15991595

16001596
ConnectSuccess.ExecuteIfBound();

Source/AccelByteUe4Sdk/Private/Api/AccelByteStatisticApi.cpp

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,77 @@ void Statistic::GetGlobalStatItemsByStatCode(const FString& StatCode
256256
HttpClient.ApiRequest(TEXT("GET"), Url, {}, FString(), OnSuccess, OnError);
257257
}
258258

259+
void Statistic::GetUserStatCycleItems(
260+
const FString& CycleId,
261+
const THandler<FAccelByteModelsUserStatCycleItemPagingSlicedResult>& OnSuccess,
262+
const FErrorHandler& OnError,
263+
const int32 Limit,
264+
const int32 Offset,
265+
const TArray<FString> StatCodes)
266+
{
267+
FReport::Log(FString(__FUNCTION__));
268+
269+
const FString Url = FString::Printf(TEXT("%s/v1/public/namespaces/%s/users/%s/statCycles/%s/statCycleitems")
270+
, *SettingsRef.StatisticServerUrl
271+
, *CredentialsRef.GetNamespace()
272+
, *CredentialsRef.GetUserId()
273+
, *CycleId);
274+
275+
TMap<FString, FString> QueryParams = {
276+
{TEXT("limit"), FString::FromInt(Limit)},
277+
{TEXT("offset"), FString::FromInt(Offset)},
278+
};
279+
280+
if(StatCodes.Num() > 0)
281+
{
282+
QueryParams.Add(TEXT("statCodes"), FString::Join(StatCodes, TEXT(",")));
283+
}
284+
285+
HttpClient.ApiRequest(TEXT("GET"), Url, QueryParams, FString(), OnSuccess, OnError);
286+
}
287+
288+
void Statistic::GetStatCycleConfig(const FString& CycleId
289+
,const THandler<FAccelByteModelsStatCycleConfig>& OnSuccess
290+
,const FErrorHandler& OnError)
291+
{
292+
FReport::Log(FString(__FUNCTION__));
293+
294+
const FString Url = FString::Printf(TEXT("%s/v1/public/namespaces/%s/statCycles/%s")
295+
, *SettingsRef.StatisticServerUrl
296+
, *CredentialsRef.GetNamespace()
297+
, *CycleId);
298+
299+
HttpClient.ApiRequest(TEXT("GET"), Url, {}, FString(), OnSuccess, OnError);
300+
}
301+
302+
void Statistic::GetListStatCycleConfigs(const EAccelByteCycle& CycleType,
303+
const THandler<FAccelByteModelsStatCycleConfigPagingResult>& OnSuccess,
304+
const FErrorHandler& OnError,
305+
const int32 Limit,
306+
const int32 Offset)
307+
{
308+
FReport::Log(FString(__FUNCTION__));
309+
310+
const FString Url = FString::Printf(TEXT("%s/v1/public/namespaces/%s/statCycles")
311+
, *SettingsRef.StatisticServerUrl
312+
, *CredentialsRef.GetNamespace());
313+
314+
TMap<FString, FString> QueryParams = {
315+
{TEXT("limit"), FString::FromInt(Limit)},
316+
{TEXT("offset"), FString::FromInt(Offset)},
317+
};
318+
319+
const UEnum* EnumPtr = FindObject<UEnum>(ANY_PACKAGE, TEXT("EAccelByteCycle"), true);
320+
if (EnumPtr)
321+
{
322+
FString EnumText = EnumPtr->GetNameStringByIndex(static_cast<int32>(CycleType));
323+
324+
QueryParams.Add(TEXT("cycleType"), EnumText.ToUpper());
325+
}
326+
327+
HttpClient.ApiRequest(TEXT("GET"), Url, QueryParams, FString(), OnSuccess, OnError);
328+
}
329+
259330
#if !UE_BUILD_SHIPPING
260331
void Statistic::BulkResetMultipleUserStatItemsValue(const TArray<FAccelByteModelsResetUserStatItemValue>& UserStatItemValue
261332
, const THandler<TArray<FAccelByteModelsUpdateUserStatItemsResponse>>& OnSuccess

Source/AccelByteUe4Sdk/Private/Api/AccelByteUGCApi.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ void UGC::ModifyContent(FString const& ChannelId
143143
Req.ContentType = ModifyRequest.ContentType;
144144
Req.PreviewMetadata = ModifyRequest.PreviewMetadata;
145145
Req.UpdateContentFile = true;
146+
Req.CustomAttributes = ModifyRequest.CustomAttributes;
146147

147148
ModifyContent(ChannelId, ContentId, Req, OnSuccess, OnError);
148149
}

Source/AccelByteUe4Sdk/Private/Api/AccelByteUserProfileApi.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,14 +105,11 @@ void UserProfile::GetPublicCustomAttributes(const FString& UserId
105105
{
106106
FReport::Log(FString(__FUNCTION__));
107107
FReport::LogDeprecated(FString(__FUNCTION__), "This will no longer able to use since will give security hole issue for other player/user, "
108-
"please use GetPublicUserProfileInfo instead");
108+
"please use GetPublicUserProfileInfo instead");
109109

110-
const FString Url = FString::Printf(TEXT("%s/v1/public/namespaces/%s/users/%s/profiles/customAttributes")
111-
, *SettingsRef.BasicServerUrl
112-
, *CredentialsRef.GetNamespace()
113-
, *UserId);
110+
OnError.ExecuteIfBound(static_cast<int>(ErrorCodes::Deprecated),
111+
TEXT("This will no longer able to use since will give security hole issue for other player/user, use GetPublicUserProfileInfo instead"));
114112

115-
HttpClient.ApiRequest(TEXT("GET"), Url, {}, FString(), OnSuccess, OnError);
116113
}
117114

118115
void UserProfile::UpdateUserProfile(const FAccelByteModelsUserProfileUpdateRequest& ProfileUpdateRequest

Source/AccelByteUe4Sdk/Private/Blueprints/ABUser.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,21 @@ void UABUser::Logout(FDHandler OnSuccess
149149
}));
150150
}
151151

152+
void UABUser::LoginByExchangeCodeForToken(FString Code, FDHandler OnSuccess, FDErrorHandler OnError)
153+
{
154+
ApiClientPtr->User.GenerateGameToken(Code
155+
, FVoidHandler::CreateLambda(
156+
[OnSuccess]()
157+
{
158+
OnSuccess.ExecuteIfBound();
159+
})
160+
, FOAuthErrorHandler::CreateLambda(
161+
[OnError](int Code, FString const& Message, const FErrorOAuthInfo& Info)
162+
{
163+
OnError.ExecuteIfBound(Code, Message);
164+
}));
165+
}
166+
152167
void UABUser::ForgetAllCredentials()
153168
{
154169
ApiClientPtr->User.ForgetAllCredentials();

0 commit comments

Comments
 (0)