PluginProbe
Fluent Support – Helpdesk & Customer Support Ticket System / 2.4.5
Fluent Support – Helpdesk & Customer Support Ticket System v2.4.5
2.4.5 2.4.0 2.3.2 2.3.1 2.3.0 2.2.1 2.2.0 trunk 1.10.0 1.10.1 1.10.2 1.10.3 1.10.4 1.10.5 1.4.0 1.4.1 1.4.2 1.4.5 1.4.6 1.4.7 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 All 69 releases
← All changes | app/Services/Notifications/MentionParser.php +1 -5 2.3.0 → 2.4.5 View file →
@@ -4,11 +4,9 @@
4 4
5 5 class MentionParser
6 6 {
7 7 /**
8 - * Extract agent IDs from message content.
9 - *
10 - * Handles two mention formats:
8 + * Agent IDs mentioned in the content, in either format:
11 9 * - Rich editor: <span class="fs_agent_mention" data-mention-username="7">
12 10 * - Plain-text editor: @[7:Display Name]
13 11 *
14 12 * @param string $content
@@ -23,9 +21,8 @@
23 21 }
24 22
25 23 $ids = [];
26 24
27 - // Rich editor — span with numeric data-mention-username.
28 25 if (stripos($content, 'data-mention-username') !== false) {
29 26 preg_match_all(
30 27 '/<span\b[^>]*\bclass=["\'][^"\']*\bfs_agent_mention\b[^"\']*["\'][^>]*\bdata-mention-username=["\'](\d+)["\'][^>]*>/i',
31 28 $content,
@@ -36,9 +33,8 @@
36 33 $ids[] = (int) $id;
37 34 }
38 35 }
39 36
40 - // Plain-text editor — @[agentId:Display Name] token.
41 37 if (strpos($content, '@[') !== false) {
42 38 preg_match_all('/@\[(\d+):[^\]]+\]/', $content, $tokenMatches);
43 39
44 40 foreach ($tokenMatches[1] ?? [] as $id) {