PluginProbe
FluentBoards – Project Management, Task Management, Goal Tracking, Kanban Board, and, Team Collaboration / trunk
FluentBoards – Project Management, Task Management, Goal Tracking, Kanban Board, and, Team Collaboration vtrunk
2.0.15 2.0.12 2.0.10 2.0.4 2.0.1 2.0.0 1.95.3 1.95.2 1.95 1.91.6 trunk 1.11 1.12 1.13 1.20 1.21 1.22 1.23 1.30 1.31 1.32 1.35 1.40 1.41 1.45 All 41 releases
← All changes | app/Modules/MCP/Tools/CommentTools.php +7 -0 2.0.10trunk View file →
@@ -3,8 +3,9 @@
3 3 namespace FluentBoards\App\Modules\MCP\Tools;
4 4
5 5 use FluentBoards\App\Modules\MCP\Helpers\MCPHelper;
6 6 use FluentBoards\App\Services\CommentService;
7 +use FluentBoards\App\Services\NotificationService;
7 8
8 9 /**
9 10 * Comment write tools.
10 11 */
@@ -27,8 +28,14 @@
27 28 }
28 29
29 30 $privacy = !empty($params['privacy']) && $params['privacy'] === 'public' ? 'public' : 'private';
30 31 $mentionedIds = MCPHelper::sanitizeIdArray($params['mentioned_ids'] ?? []);
32 + $boardMemberIds = (new NotificationService())->resolveBoardMentionUserIds($task->board_id, $mentionedIds);
33 + if (array_diff($mentionedIds, $boardMemberIds)) {
34 + return MCPHelper::error('forbidden', __('One or more mentioned users are not members of this board', 'fluent-boards'));
35 + }
36 +
37 + $mentionedIds = $boardMemberIds;
31 38 $commentService = new CommentService();
32 39
33 40 $comment = $commentService->create([
34 41 'board_id' => (int) $task->board_id,