feat(talk): replace text type prefixes with emojis in messages
- Extract `typeIcon` from mapped data in `WebhookController` and pass to `prependDisplayName` - Update `TalkService.prependDisplayName` to accept optional `$typeIcon` parameter and prepend it to the display name line - Remove text-based type labels (`[Info]`, `[Success]`, `[Warning]`, `[Error]`) and replace with emoji icons (`✅`, `⚠️`, `❌`) - Include `typeIcon` in the message payload array returned by `TalkService`
This commit is contained in:
@@ -473,7 +473,8 @@ class WebhookController extends Controller {
|
||||
|
||||
// Prepend display name since Talk doesn't support per-message avatars
|
||||
$displayName = $mapped['displayName'] ?? $senderName;
|
||||
$message = $this->talkService->prependDisplayName($displayName, $mapped['message']);
|
||||
$typeIcon = $mapped['typeIcon'] ?? '';
|
||||
$message = $this->talkService->prependDisplayName($displayName, $mapped['message'], $typeIcon);
|
||||
|
||||
// Post to Talk via Chat API
|
||||
$success = $this->talkService->postToRoom($roomToken, $message, $senderName, $richObjects);
|
||||
|
||||
Reference in New Issue
Block a user