Skip to content

Commit 77150a7

Browse files
authored
Fix discord notifications (#96)
* Fix discord moon mining notifications while import missing * Fix discord sov notifications while solar system loaded instead of MapDenormalize item.
1 parent 3a1952e commit 77150a7

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

src/Notifications/Sovereignties/Discord/SovStructureDestroyed.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
use Seat\Eveapi\Models\Character\CharacterNotification;
2626
use Seat\Eveapi\Models\Sde\InvType;
27-
use Seat\Eveapi\Models\Sde\SolarSystem;
27+
use Seat\Eveapi\Models\Sde\MapDenormalize;
2828
use Seat\Notifications\Notifications\AbstractDiscordNotification;
2929
use Seat\Notifications\Services\Discord\Messages\DiscordEmbed;
3030
use Seat\Notifications\Services\Discord\Messages\DiscordEmbedField;
@@ -68,7 +68,7 @@ public function populateMessage(DiscordMessage $message, $notifiable)
6868
$embed->author('SeAT Sovereignty Health', asset('web/img/favico/apple-icon-180x180.png'));
6969

7070
$embed->field(function (DiscordEmbedField $field) {
71-
$system = SolarSystem::find($this->notification->text['solarSystemID']);
71+
$system = MapDenormalize::find($this->notification->text['solarSystemID']);
7272

7373
$field->name('System')
7474
->value(

src/Notifications/Sovereignties/Discord/SovStructureReinforced.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
namespace Seat\Notifications\Notifications\Sovereignties\Discord;
2424

2525
use Seat\Eveapi\Models\Character\CharacterNotification;
26-
use Seat\Eveapi\Models\Sde\SolarSystem;
26+
use Seat\Eveapi\Models\Sde\MapDenormalize;
2727
use Seat\Notifications\Notifications\AbstractDiscordNotification;
2828
use Seat\Notifications\Services\Discord\Messages\DiscordEmbed;
2929
use Seat\Notifications\Services\Discord\Messages\DiscordEmbedField;
@@ -67,12 +67,12 @@ public function populateMessage(DiscordMessage $message, $notifiable)
6767
$embed->author('SeAT Sovereignty Health', asset('web/img/favico/apple-icon-180x180.png'));
6868

6969
$embed->field(function (DiscordEmbedField $field) {
70-
$system = SolarSystem::find($this->notification->text['solarSystemID']);
70+
$system = MapDenormalize::find($this->notification->text['solarSystemID']);
7171

7272
$field->name('System')
7373
->value($this->zKillBoardToDiscordLink(
7474
'system',
75-
$system->itemID,
75+
$system->itemId,
7676
sprintf('%s (%s)', $system->itemName, number_format($system->security, 2))));
7777
});
7878

src/Notifications/Structures/Traits/MoonMiningNotificationTrait.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424

2525
namespace Seat\Notifications\Notifications\Structures\Traits;
2626

27+
use Seat\Eveapi\Models\Sde\InvType;
28+
2729
trait MoonMiningNotificationTrait
2830
{
2931
const GAZ_MARKET_GROUP_ID = 2396;

0 commit comments

Comments
 (0)