// First go for the general message
// "George Bull's post"
- if ($params['activity']['explicit_tagged']) {
- $message = '%1$s tagged you on %2$s\'s %3$s %4$s';
- } elseif ($params['activity']['origin_comment']) {
+ if ($params['activity']['origin_comment']) {
$message = '%1$s replied to you on %2$s\'s %3$s %4$s';
+ } elseif ($params['activity']['explicit_tagged']) {
+ $message = '%1$s tagged you on %2$s\'s %3$s %4$s';
} else {
$message = '%1$s commented on %2$s\'s %3$s %4$s';
}
// "your post"
if ($params['activity']['origin_thread']) {
- if ($params['activity']['explicit_tagged']) {
- $message = '%1$s tagged you on your %2$s %3$s';
- } elseif ($params['activity']['origin_comment']) {
+ if ($params['activity']['origin_comment']) {
$message = '%1$s replied to you on your %2$s %3$s';
+ } elseif ($params['activity']['explicit_tagged']) {
+ $message = '%1$s tagged you on your %2$s %3$s';
} else {
$message = '%1$s commented on your %2$s %3$s';
}
$dest_str = $l10n->t($message, $params['source_name'], $item_post_type, $title);
// "their post"
} elseif ($item['author-link'] == $params['source_link']) {
- if ($params['activity']['explicit_tagged']) {
- $message = '%1$s tagged you on their %2$s %3$s';
- } elseif ($params['activity']['origin_comment']) {
+ if ($params['activity']['origin_comment']) {
$message = '%1$s replied to you on their %2$s %3$s';
+ } elseif ($params['activity']['explicit_tagged']) {
+ $message = '%1$s tagged you on their %2$s %3$s';
} else {
$message = '%1$s commented on their %2$s %3$s';
}
$attributes['avatar'] = ($author_contact['micro'] ?? '') ?: $attributes['avatar'];
$attributes['profile'] = ($author_contact['url'] ?? '') ?: $attributes['profile'];
+ // $author_contact['url'] could be empty. So then we fill it with the profile
+ $author_contact['url'] = ($attributes['profile'] ?? '') ?: $author_contact['url'];
+
if ($attributes['avatar']) {
$attributes['avatar'] = ProxyUtils::proxifyUrl($attributes['avatar'], false, ProxyUtils::SIZE_THUMB);
}