Skip to content

Commit

Permalink
corrected incorrect platform match (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
FunkeyFlo authored Aug 19, 2022
1 parent 92a9814 commit fa3ca94
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions ps5-mqtt/server/src/psn-account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,18 @@ export module PsnAccount {
titleImage: string;
titleName: string;

/**
* Type of device the title was created for.
*
* @type {NormalizedDeviceType}
*/
platform: NormalizedDeviceType;

/**
* Type of device the title is being used on.
*
* @type {NormalizedDeviceType}
*/
launchPlatform: NormalizedDeviceType;
}

Expand Down
2 changes: 1 addition & 1 deletion ps5-mqtt/server/src/redux/sagas/update-account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function* updateAccount({ payload: account }: UpdateAccountAction) {
clonedDeviceState.activity?.activePlayers.some(p => p === account.accountName);

// the player is using an app that matches the current device's platform
if (account.activity !== undefined && clonedDeviceState.type === account.activity.platform) {
if (account.activity !== undefined && clonedDeviceState.type === account.activity.launchPlatform) {
// mark activity as the new activity, extending player list in the process
clonedDeviceState.activity = {
...account.activity,
Expand Down

0 comments on commit fa3ca94

Please sign in to comment.