Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* wip: mass messaging rework * WIP notifications * feat: mass messaging * chore: tidy force migration * chore: remove dev template * style: styleci fixes * fix: mass message bypass notification settings + mass message bypass purification * fix: typo in alerts page
- Loading branch information
Showing
34 changed files
with
1,386 additions
and
314 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
/** | ||
* Represents notification data which belongs to a user. | ||
* | ||
* @package NamelessMC\DTO | ||
* @author Samerton | ||
* @version 2.2.0 | ||
* @license MIT | ||
*/ | ||
class UserNotificationData | ||
{ | ||
public bool $alert; | ||
public bool $email; | ||
public string $type; | ||
|
||
public function __construct(object $row) | ||
{ | ||
$this->alert = $row->alert; | ||
$this->email = $row->email; | ||
$this->type = $row->type; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
core/migrations/20230908180037_create_users_notification_preferences_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
use Phinx\Migration\AbstractMigration; | ||
|
||
final class CreateUsersNotificationPreferencesTable extends AbstractMigration | ||
{ | ||
public function change(): void | ||
{ | ||
$table = $this->table('nl2_users_notification_preferences'); | ||
|
||
$table | ||
->addColumn('user_id', 'integer', ['length' => 11]) | ||
->addColumn('type', 'string', ['length' => 64]) | ||
->addColumn('alert', 'boolean', ['default' => false]) | ||
->addColumn('email', 'boolean', ['default' => false]); | ||
|
||
$table->addForeignKey('user_id', 'nl2_users', 'id', ['delete' => 'CASCADE']); | ||
|
||
$table->create(); | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
core/migrations/20231121184810_add_content_rich_to_alerts_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
use Phinx\Db\Adapter\MysqlAdapter; | ||
use Phinx\Migration\AbstractMigration; | ||
|
||
final class AddContentRichToAlertsTable extends AbstractMigration | ||
{ | ||
public function change(): void | ||
{ | ||
$this->table('nl2_alerts') | ||
->addColumn('content_rich', 'text', ['default' => null, 'limit' => MysqlAdapter::TEXT_MEDIUM, 'null' => true]) | ||
->update(); | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
core/migrations/20240309204948_add_purify_bypass_colum_to_alerts_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
use Phinx\Migration\AbstractMigration; | ||
|
||
final class AddPurifyBypassColumToAlertsTable extends AbstractMigration | ||
{ | ||
public function change(): void | ||
{ | ||
$this->table('nl2_alerts') | ||
->addColumn('bypass_purify', 'boolean', ['default' => false]) | ||
->update(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
90 changes: 0 additions & 90 deletions
90
custom/panel_templates/Default/core/emails_mass_message.tpl
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.