Skip to content
This repository has been archived by the owner on Jul 12, 2022. It is now read-only.

Commit

Permalink
Merge pull request #74 from herpaderpaldent/development
Browse files Browse the repository at this point in the history
Version 1.6.7 - cleanup of deleted models
  • Loading branch information
herpaderpaldent authored Feb 9, 2019
2 parents b3087cd + e6a40de commit 39c7237
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 5 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# Version 1.6.7
This version replaces `SeATGroupNotification` models in:
* `GroupSyncFailedNotification` listener
* `MissingRefreshTokenNotification` listener
with correct `SeatNotificationRecipient` model.

Sorry about that and thank you @GoemFunaila for reporting this issue.

# Version 1.6.6
Small fix to select correct notification channel

Expand Down
28 changes: 26 additions & 2 deletions src/Listeners/GroupSyncFailedNotification.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,28 @@
<?php
/**
* MIT License.
*
* Copyright (c) 2019. Felix Huber
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/

/**
* Created by PhpStorm.
* User: felix
Expand All @@ -9,8 +33,8 @@
namespace Herpaderpaldent\Seat\SeatGroups\Listeners;

use Herpaderpaldent\Seat\SeatGroups\Events\GroupSyncFailed;
use Herpaderpaldent\Seat\SeatGroups\Models\SeatGroupNotification;
use Herpaderpaldent\Seat\SeatGroups\Notifications\SeatGroupErrorNotification;
use Herpaderpaldent\Seat\SeatNotifications\Models\SeatNotificationRecipient;
use Herpaderpaldent\Seat\SeatNotifications\Notifications\BaseNotification;
use Illuminate\Support\Facades\Notification;
use Seat\Web\Models\User;
Expand All @@ -31,7 +55,7 @@ public function handle(GroupSyncFailed $event)

if ($should_send){

$recipients = SeatGroupNotification::all()
$recipients = SeatNotificationRecipient::all()
->filter(function ($recipient) {
return $recipient->shouldReceive('seatgroup_error');
});
Expand Down
28 changes: 26 additions & 2 deletions src/Listeners/MissingRefreshTokenNotification.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,28 @@
<?php
/**
* MIT License.
*
* Copyright (c) 2019. Felix Huber
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/

/**
* Created by PhpStorm.
* User: felix
Expand All @@ -9,8 +33,8 @@
namespace Herpaderpaldent\Seat\SeatGroups\Listeners;

use Herpaderpaldent\Seat\SeatGroups\Events\MissingRefreshToken;
use Herpaderpaldent\Seat\SeatGroups\Models\SeatGroupNotification;
use Herpaderpaldent\Seat\SeatGroups\Notifications\MissingRefreshTokenNotification as RefreshTokenNotification;
use Herpaderpaldent\Seat\SeatNotifications\Models\SeatNotificationRecipient;
use Herpaderpaldent\Seat\SeatNotifications\Notifications\BaseNotification;
use Illuminate\Support\Facades\Notification;

Expand All @@ -31,7 +55,7 @@ public function handle(MissingRefreshToken $event)

if ($should_send){

$recipients = SeatGroupNotification::all()
$recipients = SeatNotificationRecipient::all()
->filter(function ($recipient) {
return $recipient->shouldReceive('missing_refreshtoken');
});
Expand Down
2 changes: 1 addition & 1 deletion src/config/seatgroups.config.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
*/

return [
'version' => '1.6.6',
'version' => '1.6.7',
];

//TODO: Update Version

0 comments on commit 39c7237

Please sign in to comment.