users worden nu beter geresolved
This commit is contained in:
@@ -100,7 +100,7 @@ class ActivityService
|
||||
|
||||
$participants = $dynamic->participants()->withPivot('display_name')->get();
|
||||
$participantsMap = $participants->reduce(function ($acc, $p) {
|
||||
$acc[$p->id] = $p->pivot->display_name ?? $p->name;
|
||||
$acc[$p->uuid] = $p->pivot->display_name ?? $p->name;
|
||||
|
||||
return $acc;
|
||||
}, []);
|
||||
@@ -115,7 +115,7 @@ class ActivityService
|
||||
$messageData['url'] = $this->getUrlForMessage($message);
|
||||
|
||||
// Resolve <user:id> placeholders to actual names/display names
|
||||
$messageData['content'] = preg_replace_callback('/<user:(\d+)>/', function ($matches) use ($participantsMap) {
|
||||
$messageData['content'] = preg_replace_callback('/<user:([0-9a-f-]+)>/', function ($matches) use ($participantsMap) {
|
||||
$userId = $matches[1];
|
||||
|
||||
return $participantsMap[$userId] ?? "User #{$userId}";
|
||||
|
||||
Reference in New Issue
Block a user