- $scope.options.tab = 1;
- // get player profile image
- if($scope.environment!=="staging"){
- $scope.player.avatar = "https://api.playlyfe.com/v1/assets/players/" + data.id + "?size=small&access_token=" + access_token;
- }else{
- $scope.player.avatar = "https://playlyfe.com/images/platform/defaults/default-user.png";
- };
- // load todos
- $scope.loadTodos();
- // get auth token for notification stream
- client.api(buildRoute("/notifications/token"),"GET", function(data){
- // open notification stream
- Playlyfe.openNotificationStream($scope.environment, $scope.game_id, $scope.player.id, data.token, function(message){
- $scope.$apply(function(){
- console.log(message);
- $scope.player_activity.unshift(message);
- });
- });
- });
- });
- });