Skip to content

Commit

Permalink
Merge pull request #559 from smartdevicelink/fix/empty_get_user_frien…
Browse files Browse the repository at this point in the history
…dly_message

Don't send GetUserFriendlyMessage when app does not have specific permissions
  • Loading branch information
jacobkeeler authored Apr 21, 2021
2 parents 71cbfe9 + 1d936c0 commit e9c3335
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions app/controller/SettingsController.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,10 +219,12 @@ SDL.SettingsController = Em.Object.create(
for (var i = 0; i < message.result.allowedFunctions.length; i++) {
messageCodes.push(message.result.allowedFunctions[i].name);
}
FFW.BasicCommunication.GetUserFriendlyMessage(
SDL.SettingsController.permissionsFriendlyMessageUpdate, appID,
messageCodes
);
if (messageCodes.length > 0) {
FFW.BasicCommunication.GetUserFriendlyMessage(
SDL.SettingsController.permissionsFriendlyMessageUpdate, appID,
messageCodes
);
}
SDL.AppPermissionsView.update(message.result.allowedFunctions, appID);
delete SDL.SDLModel.data.getListOfPermissionsPull[message.id];
}
Expand Down

0 comments on commit e9c3335

Please sign in to comment.