1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-12-19 10:42:29 +03:00

Comment Mentions: Added core back-end logic

- Added new user notification preference, opt-in by default
- Added parser to extract mentions from comment HTML, with tests to
  cover.
- Added notification and notification handling

Not yet tested, needs testing coverage.
This commit is contained in:
Dan Brown
2025-12-15 15:59:43 +00:00
parent e2f91c2bbb
commit 221c6c7e9f
13 changed files with 260 additions and 1 deletions

View File

@@ -0,0 +1,31 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('mention_history', function (Blueprint $table) {
$table->increments('id');
$table->string('mentionable_type', 50)->index();
$table->unsignedBigInteger('mentionable_id')->index();
$table->unsignedInteger('from_user_id')->index();
$table->unsignedInteger('to_user_id');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('mention_history');
}
};