Removed old developement API key

This commit is contained in:
Josef Citrine 2016-06-12 02:51:40 +01:00
parent a29b5a62bb
commit 0c1a283867
3 changed files with 41 additions and 24 deletions

View file

@ -21,6 +21,7 @@
namespace Poniverse\Ponyfm\Library\Notifications\Drivers;
use Config;
use Poniverse\Ponyfm\Contracts\Favouritable;
use Poniverse\Ponyfm\Models\Activity;
use Poniverse\Ponyfm\Models\Comment;
@ -37,8 +38,9 @@ class NativeDriver extends AbstractDriver {
* @param User[] $recipients collection of {@link User} objects
*/
private function pushNotifications(Activity $activity, $recipients) {
if (Config::get('ponyfm.gcm_key') != 'default') {
$apiKeys = array(
'GCM' => 'AIzaSyCLmCVIgASWL280rHyPz8OP7il3pf8SrGg',
'GCM' => Config::get('ponyfm.gcm_key'),
);
$webPush = new WebPush($apiKeys);
@ -64,6 +66,7 @@ class NativeDriver extends AbstractDriver {
$webPush->flush();
}
}
/**
* @inheritdoc

View file

@ -116,4 +116,17 @@ return [
*/
'user_slug_minimum_length' => 3
/*
|--------------------------------------------------------------------------
| Indexing queue name
|--------------------------------------------------------------------------
|
| Google Cloud Messaging API key. Needs to be generated in the Google Cloud
| Console as a browser key. This is used to send notifications to users
| with push notifications enabled.
|
*/
'gcm_key' => env('GCM_KEY', 'default'),
];

View file

@ -24,3 +24,4 @@ PONI_CLIENT_SECRET=null
PONYFM_DATASTORE=/vagrant/storage/app/datastore
GOOGLE_ANALYTICS_ID=null
GCM_KEY=12345