Skip to content

Commit efed272

Browse files
committed
Fix note meta only returning full name if user has one when adding notes
Fixes #2
1 parent f6eb4a3 commit efed272

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## [Unreleased] 1.0.3
2+
### Fixed
3+
- Fix note meta only returning full name if user has one when adding notes (Fixes #2)
4+
15
## 1.0.2 - 2020-10-29
26
### Added
37
- Add line break support

src/Service.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function add ($elementId, $siteId, $userId, $note)
4242
->scalar();
4343

4444
$user = User::findOne(['id' => $userId]);
45-
$meta = $user->fullName ?: $user->username . ' • ' . (new DateTime())->format(Field::$dateFormat);
45+
$meta = ($user->fullName ?: $user->username) . ' • ' . (new DateTime())->format(Field::$dateFormat);
4646

4747
return compact('meta', 'id');
4848
}

0 commit comments

Comments
 (0)