Skip to content

Commit da2c0b6

Browse files
Updated from pipeline, Version : 14.0.0
1 parent fa7abe2 commit da2c0b6

20 files changed

+400
-94
lines changed

.variables

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
export DO_UPDATE=true
22
export LEVEL=CRITICAL
33
export REPO_NAME=justice-unreal-sdk-plugin
4-
export WORKDIR=/tmp/pipelines/2610350453/567577416/
5-
export COMMIT_HASH=fa82ca4ea200e62da466b8f99df0001921a1fbd9
6-
export GIT_HASH=fa82ca4ea200e62da466b8f99df0001921a1fbd9
7-
export VERSION=13.0.0
8-
export REVISION_ID=13.0.0
4+
export WORKDIR=/tmp/pipelines/2673136433/579136363/
5+
export COMMIT_HASH=f2c97827082e85b5eb407f4590558c283bc7322b
6+
export GIT_HASH=f2c97827082e85b5eb407f4590558c283bc7322b
7+
export VERSION=14.0.0
8+
export REVISION_ID=14.0.0
99
10-
export COMMIT_MESSAGE_BASE64='Y2hvcmUocmVsZWFzZSk6IDEzLjAuMCAtIGNvbW1pdGVkIGFuZCB0YWdnZWQgYnkgSmVua2lucwo='
10+
export COMMIT_MESSAGE_BASE64='Y2hvcmUocmVsZWFzZSk6IDE0LjAuMCAtIGNvbW1pdGVkIGFuZCB0YWdnZWQgYnkgSmVua2lucwo='

CHANGELOG.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,44 @@
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+
## [14.0.0](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/branches/compare/14.0.0%0D13.0.0) (2022-07-04)
6+
7+
8+
### ⚠ BREAKING CHANGES
9+
10+
* **Lobby:** - Remove EAccelByteGeneralUserStatus
11+
- Renamed Availability to EAvailability
12+
- Renamed Availability::Availabe to EAvailability::Online
13+
* **iam:** Refactor/removal AvatarURL/User Profile related Implementation
14+
15+
### Features
16+
17+
* **auth:** Add SnapChatAuth Support ([929fe07](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/929fe07c4eb725494eb9441b527be760571ad09b))
18+
* **iam:** Login with OIDC in SDK ([5f576e4](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/5f576e430eb7a4569263d64a8b74b3940d1a8901))
19+
* **iam:** Refactor Avatar/User Profile Implementation ([0b494f6](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/0b494f6897bb3adb367e81ce79f6b76c441e8b32))
20+
* **iam:** SDK Changes for BE Refactor/removal AvatarURL/User Profile related Implementation ([102dc9c](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/102dc9caa52944bd3401a2b468d9d7f4d57a3801))
21+
* **lobby:** add Leader field in lobby models ([fdfd5b5](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/fdfd5b508c7011149e7afafc627963655c4c0b72))
22+
* **repoting:** add new enum of USER for reporting player or user ([09e9e4e](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/09e9e4efe1a8e5fd6256ad6fd9c299407e5f9e6e))
23+
* sdk adjustment for avoiding breaking changes and revisioning/reverting of phase 2 cleanup legacy Avatar/User Profile implementation ([b886deb](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/b886debd51d16e064db3a868a65204b0975d796a))
24+
* **Tests:** remove tests from module directory ([2129e63](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/2129e63efca57f9d0f7d5de3ec90700fd89f5023))
25+
* **user:** fix query search users encode twice ([db2ea07](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/db2ea071e298d5fa99ad19326c24a762cdc1a2d9))
26+
27+
28+
### Bug Fixes
29+
30+
* create ticker alias to support both UE4 FTicker and UE5 FTSTicker ([bf91b2f](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/bf91b2fa32fd70689229e9f65d62ec057c3a10ef))
31+
* wrong implementation causing errors ([b0ad23e](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/b0ad23efe21f07c3ef8987dde94fba7701822d39))
32+
33+
34+
### Tests
35+
36+
* add default value to test models and remove unused variables ([bc87073](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/bc870737ea17a47a1dd3e4aa1fd3fb031d639b49))
37+
38+
39+
### Refactors
40+
41+
* **Lobby:** Change availability type in presence model ([f246a35](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/f246a35599830b184a94371c75d5c0980f6526fd))
42+
543
## [13.0.0](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/branches/compare/13.0.0%0D12.2.1) (2022-06-20)
644

745

Content/CompatibilityMap.json

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,58 @@
11
{
22
"iam": {
3-
"minVersion": "5.11.0",
4-
"maxVersion": "5.11.0"
3+
"minVersion": "5.12.0",
4+
"maxVersion": "5.12.0"
55
},
66
"agreement": {
7-
"minVersion": "1.22.2",
8-
"maxVersion": "1.22.2"
7+
"minVersion": "1.22.3",
8+
"maxVersion": "1.22.3"
99
},
1010
"basic": {
11-
"minVersion": "1.37.0",
12-
"maxVersion": "1.37.0"
11+
"minVersion": "2.0.0",
12+
"maxVersion": "2.0.0"
1313
},
1414
"platform": {
15-
"minVersion": "4.10.1",
16-
"maxVersion": "4.10.1"
15+
"minVersion": "4.11.0",
16+
"maxVersion": "4.11.0"
1717
},
1818
"social": {
19-
"minVersion": "1.29.2",
20-
"maxVersion": "1.29.2"
19+
"minVersion": "1.29.3",
20+
"maxVersion": "1.29.3"
2121
},
2222
"leaderboard": {
23-
"minVersion": "2.15.5",
24-
"maxVersion": "2.15.5"
23+
"minVersion": "2.15.6",
24+
"maxVersion": "2.15.6"
2525
},
2626
"achievement": {
27-
"minVersion": "2.10.7",
28-
"maxVersion": "2.10.7"
27+
"minVersion": "2.10.8",
28+
"maxVersion": "2.10.8"
2929
},
3030
"cloudsave": {
31-
"minVersion": "3.1.0",
32-
"maxVersion": "3.1.0"
31+
"minVersion": "3.1.1",
32+
"maxVersion": "3.1.1"
3333
},
3434
"ugc": {
35-
"minVersion": "2.2.0",
36-
"maxVersion": "2.2.0"
35+
"minVersion": "2.2.1",
36+
"maxVersion": "2.2.1"
3737
},
3838
"lobby": {
39-
"minVersion": "3.11.0",
40-
"maxVersion": "3.11.0"
39+
"minVersion": "3.11.1",
40+
"maxVersion": "3.11.1"
4141
},
4242
"group": {
43-
"minVersion": "2.11.5",
44-
"maxVersion": "2.11.5"
43+
"minVersion": "2.11.6",
44+
"maxVersion": "2.11.6"
4545
},
4646
"qosm": {
47-
"minVersion": "1.14.1",
48-
"maxVersion": "1.14.1"
47+
"minVersion": "1.14.2",
48+
"maxVersion": "1.14.2"
4949
},
5050
"dsmcontroller": {
51-
"minVersion": "3.2.2",
52-
"maxVersion": "3.2.2"
51+
"minVersion": "3.3.0",
52+
"maxVersion": "3.3.0"
5353
},
5454
"game-telemetry": {
55-
"minVersion": "1.7.1",
56-
"maxVersion": "1.7.1"
55+
"minVersion": "1.7.2",
56+
"maxVersion": "1.7.2"
5757
}
5858
}

Source/AccelByteUe4Sdk/Private/Api/AccelByteLobbyApi.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -677,11 +677,11 @@ void Lobby::SetPartySizeLimit(const FString& PartyId, const int32 Limit, const F
677677
//-------------------------------------------------------------------------------------------------
678678
// Presence
679679
//-------------------------------------------------------------------------------------------------
680-
FString Lobby::SendSetPresenceStatus(const Availability Availability, const FString& Activity)
680+
FString Lobby::SendSetPresenceStatus(const EAvailability Availability, const FString& Activity)
681681
{
682682
FReport::Log(FString(__FUNCTION__));
683683
SEND_RAW_REQUEST_CACHED_RESPONSE_RETURNED(SetUserPresence, Presence
684-
, FString::Printf(TEXT("availability: %d\nactivity: %s\n"), (int)Availability, *Activity))
684+
, FString::Printf(TEXT("availability: %s\nactivity: %s\n"), *FAccelByteUtilities::GetUEnumValueAsString(Availability).ToLower(), *Activity))
685685
}
686686

687687
FString Lobby::SendGetOnlineUsersRequest()

Source/AccelByteUe4Sdk/Private/Api/AccelByteUserApi.cpp

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,43 @@ void User::LoginWithOtherPlatform(
122122

123123
CredentialsRef.SetBearerAuthRejectedHandler(HttpRef);
124124
}
125+
126+
void User::LoginWithOtherPlatformId(
127+
const FString& PlatformId,
128+
const FString& PlatformToken,
129+
const FVoidHandler& OnSuccess,
130+
const FCustomErrorHandler& OnError,
131+
bool bCreateHeadless) const
132+
{
133+
FReport::Log(FString(__FUNCTION__));
134+
135+
FinalPreLoginEvents(); // Clears CredentialsRef post-auth info, inits schedulers
136+
137+
Oauth2::GetTokenWithOtherPlatformToken(
138+
CredentialsRef.GetOAuthClientId(),
139+
CredentialsRef.GetOAuthClientSecret(),
140+
PlatformId,
141+
PlatformToken,
142+
THandler<FOauth2Token>::CreateLambda(
143+
[this, OnSuccess, OnError](const FOauth2Token& Result)
144+
{
145+
CredentialsRef.SetAuthToken(Result, FPlatformTime::Seconds());
146+
OnSuccess.ExecuteIfBound();
147+
148+
}), FCustomErrorHandler::CreateLambda([this, OnError](const int32 ErrorCode, const FString& ErrorMessage, const FJsonObject& ErrorJson)
149+
{
150+
FErrorOauthInfo ErrorOauthInfo;
151+
TSharedPtr<FJsonObject> JsonObject = MakeShared<FJsonObject>(ErrorJson);
152+
if (FJsonObjectConverter::JsonObjectToUStruct<FErrorOauthInfo>(JsonObject.ToSharedRef(), &ErrorOauthInfo, 0, 0) == false)
153+
{
154+
FReport::Log(TEXT("Cannot deserialize the whole ErrorJson to the struct "));
155+
}
156+
CredentialsRef.SetErrorOAuth(ErrorOauthInfo);
157+
OnError.ExecuteIfBound(ErrorCode, ErrorMessage, ErrorJson);
158+
}), bCreateHeadless);
159+
160+
CredentialsRef.SetBearerAuthRejectedHandler(HttpRef);
161+
}
125162

126163
void User::LoginWithUsername(
127164
const FString& Username,
@@ -1303,5 +1340,34 @@ void User::MakeDefault2FaFactors(EAccelByteLoginAuthFactorType AuthFactorType ,c
13031340
HttpRef.ProcessRequest(Request, CreateHttpResultHandler(OnSuccess, OnError), FPlatformTime::Seconds());
13041341
}
13051342

1343+
void User::UpdateUserV3(FUserUpdateRequest UpdateRequest, const THandler<FAccountUserData>& OnSuccess, const FErrorHandler& OnError)
1344+
{
1345+
FReport::Log(FString(__FUNCTION__));
1346+
1347+
if (!UpdateRequest.EmailAddress.IsEmpty())
1348+
{
1349+
OnError.ExecuteIfBound(400, TEXT("Cannot update user email using this function. Use UpdateEmail instead."));
1350+
return;
1351+
}
1352+
1353+
FString Authorization = FString::Printf(TEXT("Bearer %s"), *CredentialsRef.GetAccessToken());
1354+
FString Url = FString::Printf(TEXT("%s/v3/public/namespaces/%s/users/me"), *SettingsRef.IamServerUrl, *SettingsRef.Namespace);
1355+
FString Verb = TEXT("PATCH");
1356+
FString ContentType = TEXT("application/json");
1357+
FString Accept = TEXT("application/json");
1358+
FString Content;
1359+
FJsonObjectConverter::UStructToJsonObjectString(UpdateRequest, Content);
1360+
1361+
FHttpRequestPtr Request = FHttpModule::Get().CreateRequest();
1362+
Request->SetURL(Url);
1363+
Request->SetHeader(TEXT("Authorization"), Authorization);
1364+
Request->SetVerb(Verb);
1365+
Request->SetHeader(TEXT("Content-Type"), ContentType);
1366+
Request->SetHeader(TEXT("Accept"), Accept);
1367+
Request->SetContentAsString(Content);
1368+
1369+
HttpRef.ProcessRequest(Request, CreateHttpResultHandler(OnSuccess, OnError), FPlatformTime::Seconds());
1370+
}
1371+
13061372
} // Namespace Api
13071373
} // Namespace AccelByte

Source/AccelByteUe4Sdk/Private/Api/AccelByteUserProfileApi.cpp

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,75 @@ void UserProfile::GetUserProfilePublicInfoByPublicId(const FString& PublicId, co
221221

222222
HttpRef.ProcessRequest(Request, CreateHttpResultHandler(OnSuccess, OnError), FPlatformTime::Seconds());
223223
}
224+
225+
void UserProfile::CreateUserProfile(const FString& UserId, FAccelByteModelsUserProfileCreateRequest& ProfileCreateRequest, const THandler<FAccelByteModelsUserProfileInfo>& OnSuccess, const FErrorHandler& OnError)
226+
{
227+
FReport::Log(FString(__FUNCTION__));
228+
229+
FString Authorization = FString::Printf(TEXT("Bearer %s"), *CredentialsRef.GetAccessToken());
230+
FString Url = FString::Printf(TEXT("%s/v1/public/namespaces/%s/users/%s/profiles"), *SettingsRef.BasicServerUrl, *CredentialsRef.GetNamespace(), *UserId);
231+
FString Verb = TEXT("POST");
232+
FString ContentType = TEXT("application/json");
233+
FString Accept = TEXT("application/json");
234+
FString Content;
235+
TSharedPtr<FJsonObject> Json = FJsonObjectConverter::UStructToJsonObject(ProfileCreateRequest);
236+
FAccelByteUtilities::RemoveEmptyStrings(Json);
237+
TSharedRef<TJsonWriter<>> const Writer = TJsonWriterFactory<>::Create(&Content);
238+
FJsonSerializer::Serialize(Json.ToSharedRef(), Writer);
239+
240+
FHttpRequestPtr Request = FHttpModule::Get().CreateRequest();
241+
Request->SetURL(Url);
242+
Request->SetHeader(TEXT("Authorization"), Authorization);
243+
Request->SetVerb(Verb);
244+
Request->SetHeader(TEXT("Content-Type"), ContentType);
245+
Request->SetHeader(TEXT("Accept"), Accept);
246+
Request->SetContentAsString(Content);
247+
248+
HttpRef.ProcessRequest(Request, CreateHttpResultHandler(OnSuccess, OnError), FPlatformTime::Seconds());
249+
}
250+
251+
void UserProfile::UpdateUserProfile(const FString& UserId, const FAccelByteModelsUserProfileUpdateRequest& ProfileUpdateRequest, const THandler<FAccelByteModelsUserProfileInfo>& OnSuccess, const FErrorHandler& OnError)
252+
{
253+
FReport::Log(FString(__FUNCTION__));
254+
255+
FString Authorization = FString::Printf(TEXT("Bearer %s"), *CredentialsRef.GetAccessToken());
256+
FString Url = FString::Printf(TEXT("%s/v1/public/namespaces/%s/users/%s/profiles"), *SettingsRef.BasicServerUrl, *CredentialsRef.GetNamespace(), *UserId);
257+
FString Verb = TEXT("PUT");
258+
FString ContentType = TEXT("application/json");
259+
FString Accept = TEXT("application/json");
260+
FString Content;
261+
FJsonObjectConverter::UStructToJsonObjectString(ProfileUpdateRequest, Content);
262+
263+
FHttpRequestPtr Request = FHttpModule::Get().CreateRequest();
264+
Request->SetURL(Url);
265+
Request->SetHeader(TEXT("Authorization"), Authorization);
266+
Request->SetVerb(Verb);
267+
Request->SetHeader(TEXT("Content-Type"), ContentType);
268+
Request->SetHeader(TEXT("Accept"), Accept);
269+
Request->SetContentAsString(Content);
270+
271+
HttpRef.ProcessRequest(Request, CreateHttpResultHandler(OnSuccess, OnError), FPlatformTime::Seconds());
272+
}
273+
274+
void UserProfile::GetUserProfile(const FString& UserId, const THandler<FAccelByteModelsUserProfileInfo>& OnSuccess, const FErrorHandler& OnError)
275+
{
276+
FReport::Log(FString(__FUNCTION__));
277+
278+
FString Authorization = FString::Printf(TEXT("Bearer %s"), *CredentialsRef.GetAccessToken());
279+
FString Url = FString::Printf(TEXT("%s/v1/public/namespaces/%s/users/%s/profiles"), *SettingsRef.BasicServerUrl, *CredentialsRef.GetNamespace(), *UserId);
280+
FString Verb = TEXT("GET");
281+
FString ContentType = TEXT("application/json");
282+
FString Accept = TEXT("application/json");
283+
284+
FHttpRequestPtr Request = FHttpModule::Get().CreateRequest();
285+
Request->SetURL(Url);
286+
Request->SetHeader(TEXT("Authorization"), Authorization);
287+
Request->SetVerb(Verb);
288+
Request->SetHeader(TEXT("Content-Type"), ContentType);
289+
Request->SetHeader(TEXT("Accept"), Accept);
290+
291+
HttpRef.ProcessRequest(Request, CreateHttpResultHandler(OnSuccess, OnError), FPlatformTime::Seconds());
292+
}
224293

225294
} // Namespace Api
226295
} // Namespace AccelByte

Source/AccelByteUe4Sdk/Private/Blueprints/ABUser.cpp

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,28 @@ void UABUser::LoginWithOtherPlatform(
5151
}), bCreateHeadless);
5252
}
5353

54+
void UABUser::LoginWithOtherPlatformId(
55+
FString const& PlatformId,
56+
FString const& PlatformToken,
57+
FDHandler OnSuccess,
58+
FDErrorHandler OnError,
59+
bool bCreateHeadless)
60+
{
61+
ApiClientPtr->User.LoginWithOtherPlatformId(
62+
PlatformId,
63+
PlatformToken,
64+
FVoidHandler::CreateLambda(
65+
[OnSuccess]()
66+
{
67+
OnSuccess.ExecuteIfBound();
68+
}),
69+
FCustomErrorHandler::CreateLambda(
70+
[OnError](int Code, FString const& Message, const FJsonObject& ErrorJson)
71+
{
72+
OnError.ExecuteIfBound(Code, Message);
73+
}), bCreateHeadless);
74+
}
75+
5476
void UABUser::LoginWithDeviceId(
5577
FDHandler OnSuccess,
5678
FDErrorHandler OnError)

Source/AccelByteUe4Sdk/Private/Blueprints/AccelByteLobbyBlueprints.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ void UAccelByteBlueprintsLobby::SetGetAllUserPresenceResponseDelegate(FGetAllFri
375375
FRegistry::Lobby.SetGetAllUserPresenceResponseDelegate(OnInfoPartyResponseDelegate);
376376
}
377377

378-
void UAccelByteBlueprintsLobby::SetPresenceStatus(Availability State, FString GameName)
378+
void UAccelByteBlueprintsLobby::SetPresenceStatus(EAvailability State, FString GameName)
379379
{
380380
FRegistry::Lobby.SendSetPresenceStatus(State, GameName);
381381
}

Source/AccelByteUe4Sdk/Private/Core/AccelByteUtilities.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,8 @@ FString FAccelByteUtilities::GetPlatformString(EAccelBytePlatformType Platform)
298298
return "awscognito";
299299
case EAccelBytePlatformType::Nintendo:
300300
return "nintendo";
301+
case EAccelBytePlatformType::SnapChat:
302+
return "snapchat";
301303
default:
302304
return "unknown";
303305
}

Source/AccelByteUe4Sdk/Public/Api/AccelByteLobbyApi.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ class ACCELBYTEUE4SDK_API Lobby
501501
* @param State the presence state that you want to use. State is Presence type
502502
* @param GameName the game name that you play
503503
*/
504-
FString SendSetPresenceStatus(const Availability Availability, const FString& Activity);
504+
FString SendSetPresenceStatus(const EAvailability Availability, const FString& Activity);
505505

506506
/**
507507
* @brief Accept a party invitation.

0 commit comments

Comments
 (0)